zan*_*dm7 37 update-manager apt
看起来这应该是真的,但我想确定一下。谢谢!
kir*_*iri 26
不,它们不一样。apt-get upgrade
不处理版本之间不断变化的依赖关系,所以如果一个包改变了依赖关系,它不会被升级(它会被“阻止”)。有关更多详细信息,请参阅长答案。
使用软件更新程序和使用sudo apt-get update ; sudo apt-get dist-upgrade
(注意dist-
)几乎是等效的,除了一个显然是 GUI,另一个是控制台应用程序,还有一些非常小的信息差异。
apt-get upgrade
:
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.
Run Code Online (Sandbox Code Playgroud)
(我强调)
这意味着具有旧版本中不需要的新依赖项的较新版本包将不会使用此方法升级(除非已安装新依赖项)。这些将显示为“保留”。
apt-get dist-upgrade
:
dist-upgrade
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions
of packages; apt-get has a "smart" conflict resolution system, and
it will attempt to upgrade the most important packages at the
expense of less important ones if necessary. The dist-upgrade
command may therefore remove some packages. The
/etc/apt/sources.list file contains a list of locations from which
to retrieve desired package files. See also apt_preferences(5) for
a mechanism for overriding the general settings for individual
packages.
Run Code Online (Sandbox Code Playgroud)
(我强调)
这意味着使用此命令而不是upgrade
,可以升级具有新(或删除)依赖项的包。
两者之间差异的一个很好的例子是发布新的 Linux 内核时。这被打包到linux-image-generic
始终依赖于 Linux 内核的最新包的包中。因为linux-image-generic
每次内核升级都会改变依赖关系,所以upgrade
不会升级它。
小智 4
几乎是一样的,但又不完全一样。例如,当提供内核更新时,sudo apt-get update && sudo apt-get dist-upgrade
需要获取这些更新。
sudo apt-get update && sudo apt-get upgrade
会告诉您一些包裹已被扣留。
使用软件更新程序使一切变得无缝,您不会看到任何阻碍。
归档时间: |
|
查看次数: |
10752 次 |
最近记录: |