Ubuntu服务器消息说包可以更新,但apt-get不更新任何

可能重复:
亚马逊EC2的Ubuntu 10.04服务器更新

当我loginUbuntu 10.04.2 LTS服务器时,我看到以下消息:

42 packages can be updated. 18 updates are security updates. 

但是,当我尝试更新这个,没有得到升级,如预期的那样:

 $ sudo apt-get update ....snip.... Reading package lists... Done $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done The following packages have been kept back: linux-generic-pae linux-headers-generic-pae linux-image-generic-pae 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 

任何想法为什么没有更新,或者为什么3(从apt-get)的计数是不同于42? 什么软件说42不适合?

(其他细节:这是服务器版本,没有GUI;我没有触及aptconfiguration文件;当我安装软件,我拒绝允许自动更新)

此消息来自MOTD(当天的消息)系统。 最近在这个答案中详细说明了如何解决这个消息和软件包pipe理器之间不协调的细节。

为了安装软件包,你必须运行:

 sudo apt-get update && sudo apt-get dist-upgrade 

尝试只运行sudo apt-get update && sudo apt-get upgrade不会安装软件包,因为默认情况下apt-get upgrade不会尝试安装新软件包(如新的内核版本)。 从手册页: 在任何情况下都不会安装已经安装的软件包,或者已经安装的软件包没有被检索和安装。

然而, 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. So, dist-upgrade command may 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. 

sudo apt-get升级

它应该为你工作,欢呼声