软件更新程序与 apt-get 更新

Chr*_*isW 11 ubuntu

我一直认为 runningapt-get update其次apt-get upgrade是运行软件更新程序的命令行版本;但是,运行软件更新程序会导致以下软件包需要更新:

Complete Generic Linux kernel  
Header files relates to Linux kernel version 3.2.0  
Linux kernel headers for version 3.2.0 on 64 bit x86 SMP  
Generic Linux kernel headers  
Linux kernel image for version 3.2.0 on 64 bit x86 SMP  
General Linux kernel image  
Linux Kernel Headers for development

ISC DHCP client  
common file used by all the isc-dhcp* packages  
LightDM GObject client library  
graphical boot animation and logger-shared libraries  
DisplayManager  
graphical  boot animation and logger-main package  
graphical boot animation and logger-label control  
graphical boot animation and logger-ubuntu-logo theme (-logo)  
graphical boot animation and logger-ubuntu-logo theme (-text)  
Jabber/XMPP connection manager

(53.9 MB)
Run Code Online (Sandbox Code Playgroud)

而运行apt-get updateapt-get upgrade导致:

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
The following packages have been kept back:  
  linux-generic linux-headers-generic linux-image-generic  
The following packages will be upgraded:  
  isc-dhcp-client isc-dhcp-common liblightdm-gobject-1-0 libplymouth2 lightdm  
  linux-libc-dev plymouth plymouth-label plymouth-theme-ubuntu-logo  
  plymouth-theme-ubuntu-text telepathy-gabble  
11 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  
Need to get 2,594 kB of archives.  
After this operation, 2,048 B of additional disk space will be used.  
Run Code Online (Sandbox Code Playgroud)

任何人都可以解释发生了什么?

ter*_*don 9

这里似乎有些混乱。

  • apt-get update :这只是刷新可用包的列表。

  • apt-get upgrade:这会将任何已安装的软件包升级到最新版本。

  • apt-get dist-upgrade :与 upgrade 相同,但使用“智能”冲突解决系统,它会在必要时尝试升级最重要的软件包,而牺牲不太重要的软件包。

因此,如果您想要确保当前安装的软件包是可用的最新版本,则运行

apt-get update && apt-get upgrade
Run Code Online (Sandbox Code Playgroud)

如果这导致问题,那么您可能想尝试:

apt-get update && apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

现在,您发布的消息与 无关dist-upgrade,它们是简单的升级。它们之间也绝对没有区别,只是软件更新程序在列出包名称的同时为您提供了包的描述apt-get。例如

Complete Generic Linux kernel  == linux-generic
ISC DHCP client                == isc-dhcp-client
Jabber/XMPP connection manager == telepathy-gabble  
Run Code Online (Sandbox Code Playgroud)

如果您仔细阅读这两个列表,您会发现它们是完全相同的包。

也就是说,您发布的消息说的完全相同。


ger*_*los 1

afaik,你错过了第三块:

apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

实际上,在某些情况下,apt-get Upgrade 不会升级软件包,例如当它们更改依赖项或需要删除其他一些软件包时。Bu apt-get dist-upgrade 将。因此,要获得与软件更新程序类似的行为,您需要:

apt-get update && apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

或者,如果您想玩得更安全一点:

apt-get update && apt-get upgrade && apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

请参阅:http://www.ghacks.net/2010/03/11/what-is-it-with-the-dist-upgrade-option-of-apt-get/
还有: https: //askubuntu.com /q/194651/125726

  • “apt-get update && apt-get Upgrade && apt-get dist-upgrade” 除了 `dist-upgrade` 执行也由 `upgrade` 运行的所有操作。 (2认同)