当前位置: 首页>>技术教程>>正文


使用apt-get升级时如何强制安装内核更新?

, , , ,

问题描述

要更新我的服务器,我使用apt-get upgrade

但是当有内核更新时,我总是需要做apt-get install linux-....,因为apt-get update不会安装它们。

有没有办法告诉它安装它们?我试过-f但它不起作用。

最佳解决思路

所以,关于评论:对不起,你是对的,我完全是mis-reading apt-get告诉我的(我正在使用英文版!:))。

经过一番研究,你可能想要使用的是aptitude safe-upgrade,它确实安装了新的内核。真!我仔细检查了! 🙂

除非你特别需要apt-get中的东西,否则你应该更喜欢aptitude一般来说apt-get

nknight@nkubuntu1004:~$ sudo aptitude safe-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Resolving dependencies...
Resolving dependencies...
The following NEW packages will be installed:
  linux-headers-2.6.32-24{a} linux-headers-2.6.32-24-generic{a} linux-image-2.6.32-24-generic{a} 
The following packages will be upgraded:
  apt apt-transport-https apt-utils base-files firefox firefox-branding firefox-gnome-support gdm google-chrome-stable 
  icedtea-6-jre-cacao linux-generic linux-headers-generic linux-image-generic linux-libc-dev openjdk-6-jre openjdk-6-jre-headless 
  openjdk-6-jre-lib software-center thunderbird ureadahead xulrunner-1.9.2 
21 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 129MB of archives. After unpacking 188MB will be used.
Do you want to continue? [Y/n/?] 

次佳解决思路

您正在寻找

sudo apt-get dist-upgrade

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/2475.html,未经允许,请勿转载。