我想从终端更新我的 Ubuntu 14.04 系统,我知道这些sudo apt-get update && sudo apt-get upgrade
命令,但当我检查更新管理器时,内核更新仍然存在。这是为什么?我该怎么做才能从终端更新内核。
答案1
您需要执行dist-upgrade
才能安装/删除与使用 升级的软件包相关的所有依赖项upgrade
。从apt-get 手册页:
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.
因此,更好的升级方式是:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
但是,使用时要小心,dist-upgrade
因为它也可能会删除软件包以满足依赖关系。
答案2
apt-get upgrade 不会安装新软件或删除软件,这是安装新内核时必须执行的操作...请参阅线程。
你可以做的事情(摘自此主题,请阅读全文以了解更多信息):
使用能力:
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude full-upgrade
你也可以sudo apt-get dist-upgrade
使用sudo apt-get upgrade