-4

只是想在最新的 ubuntu 上将 firefox 从 11.0 更新到 13.0,所以执行了以下操作:

$ sudo apt-get 升级火狐

认为我的Firefox会升级。

相反,ubuntu 似乎开始更新整个系统中的每一个包。现在我无法停止该过程,因为担心如果我这样做可能会使系统处于不一致的状态。

在命令行中发出正确的命令以升级单个软件包时,我哪里出错了。OK,幸好15分钟后命令成功返回。

升级和更新有什么区别?

谢谢,

约翰·戈切

4

3 回答 3

6

直接取自 apt-get 手册页:

update
   update is used to resynchronize the package index files from their
   sources. The indexes of available packages are fetched from the
   location(s) specified in /etc/apt/sources.list. For example, when
   using a Debian archive, this command retrieves and scans the
   Packages.gz files, so that information about new and updated
   packages is available. An update should always be performed before
   an upgrade or dist-upgrade. Please be aware that the overall
   progress meter will be incorrect as the size of the package files
   cannot be known in advance.

upgrade
   upgrade is used to install the newest versions of all packages
   currently installed on the system from the sources enumerated in
   /etc/apt/sources.list. Packages currently installed with new
   versions available are retrieved and upgraded; under no
   circumstances are currently installed packages removed, or packages
   not already installed retrieved and installed. New versions of
   currently installed packages that cannot be upgraded without
   changing the install status of another package will be left at
   their current version. An update must be performed first so that
   apt-get knows that new versions of packages are available.

update 用于更新 apt-get 包列表, upgrade 用于安装所有包的更新。要仅更新一个包,请使用 install。

sudo apt-get install firefox
于 2012-07-15T19:28:28.483 回答
0

尝试这个:

apt-get update
apt-get install firefox

您还必须使用 install 命令来安装和更新软件包。

于 2012-07-15T19:23:55.567 回答
0

来自man apt-get

升级

upgrade 用于从 /etc/apt/sources.list 中列举的源安装当前安装在系统上的所有软件包的最新版本。检索和升级当前安装的带有可用新版本的软件包

(...)

安装

install 后跟一个或多个安装或升级所需的软件包。

(...)

于 2012-07-15T19:27:18.137 回答