无法使用最新内核版本更新 ubuntu 14.04 服务器

无法使用最新内核版本更新 ubuntu 14.04 服务器

我正在尝试更新 Ubuntu 14.04。它当前运行的是内核版本 3.16.0-51-generic。执行命令 sudo apt-get upgrade -f,得到以下结果:

> $ sudo apt-get upgrade -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
  linux-headers-3.16.0-45 linux-headers-3.16.0-45-generic
  linux-headers-3.16.0-46 linux-headers-3.16.0-46-generic
  linux-headers-3.16.0-48 linux-headers-3.16.0-48-generic
  linux-headers-3.16.0-49 linux-headers-3.16.0-49-generic
  linux-headers-3.16.0-50 linux-headers-3.16.0-50-generic
  linux-image-3.16.0-30-generic linux-image-3.16.0-45-generic
  linux-image-3.16.0-46-generic linux-image-3.16.0-48-generic
  linux-image-3.16.0-49-generic linux-image-3.16.0-50-generic
  linux-image-extra-3.16.0-30-generic linux-image-extra-3.16.0-45-generic
  linux-image-extra-3.16.0-46-generic linux-image-extra-3.16.0-48-generic
  linux-image-extra-3.16.0-49-generic linux-image-extra-3.16.0-50-generic
  linux-image-extra-3.16.0-53-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  linux-image-3.16.0-53-generic linux-image-3.16.0-60-generic
The following packages will be upgraded:
  apport apport-gtk apt apt-transport-https apt-utils bash-completion
  bind9-host binutils biosdevname bsdutils cups cups-browsed cups-client
  cups-common cups-core-drivers cups-daemon cups-filters
  cups-filters-core-drivers cups-ppdc cups-server-common curl dnsutils firefox
  gir1.2-gnomedesktop-3.0 gir1.2-gst-plugins-base-1.0 gir1.2-gudev-1.0
  gir1.2-ibus-1.0 gir1.2-networkmanager-1.0 gir1.2-nmgtk-1.0 gir1.2-polkit-1.0
  gir1.2-vte-2.90 gnome-desktop3-data grub-common grub-pc grub-pc-bin
  grub2-common gstreamer1.0-plugins-base gstreamer1.0-x gtk2-engines-pixbuf
  gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-libs ibus ibus-gtk
  ibus-gtk3 ifupdown im-config indicator-session irqbalance isc-dhcp-client
  isc-dhcp-common krb5-locales libapt-inst1.5 libapt-pkg4.12 libbind9-90
  libblkid1 libcgmanager0 libcomerr2 libcups2 libcupscgi1 libcupsfilters1
  libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3 libcurl3-gnutls libdns100
  libdpkg-perl libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2
  libegl1-mesa libegl1-mesa-drivers libffi6 libfontembed1 libgail-common
  libgail18 libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
  libgles2-mesa libgnome-desktop-3-7 libgnutls-openssl27 libgnutls26
  libgssapi-krb5-2 libgstreamer-plugins-base1.0-0 libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-common libgudev-1.0-0 libhunspell-1.3-0 libibus-1.0-5
  libido3-0.1-0 libisc95 libisccc90 libisccfg90 libk5crypto3 libkrb5-3
  libkrb5support0 libldb1 liblightdm-gobject-1-0 liblwres90 libmbim-glib0
  libmm-glib0 libmount1 libmtp-common libmtp-runtime libmtp9
  libnautilus-extension1a libnm-glib-vpn1 libnm-glib4 libnm-gtk-common
  libnm-gtk0 libnm-util2 libnss3 libnss3-nssdb libopenvg1-mesa libpam-systemd
  libpng12-0 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0
  libpoppler-glib8 libpoppler44 libpython3.4 libpython3.4-minimal
  libpython3.4-stdlib libsmbclient libsndfile1 libss2 libssl1.0.0 libstdc++6
  libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 libudev1
  libunity-control-center1 libuuid1 libvte-2.90-9 libvte-2.90-common
  libwayland-egl1-mesa libwbclient0 libxatracker2 libxml2 lshw modemmanager
  nautilus nautilus-data network-manager network-manager-gnome nginx
  nginx-common nginx-full ntpdate openssh-client openssh-server
  openssh-sftp-server openssl os-prober passwd policykit-1 poppler-utils
  python-apt python-apt-common python-ldb python-libxml2 python-samba
  python-software-properties python-urllib3 python3-apport python3-apt
  python3-distupgrade python3-gdbm python3-problem-report
  python3-software-properties python3-update-manager python3.4
  python3.4-minimal rsync samba-common samba-common-bin samba-libs smbclient
  software-properties-common software-properties-gtk ssh sudo systemd-services
  ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk udev
  unattended-upgrades unity-control-center unity-settings-daemon
  update-manager update-manager-core uuid-runtime wpasupplicant
203 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
Need to get 0 B/127 MB of archives.
After this operation, 92.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up gcc-4.8-base:amd64 (4.8.4-2ubuntu1~14.04.1) ...
(Reading database ... 390295 files and directories currently installed.)
Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.1_amd64.deb ...
Unpacking libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.1) over (4.8.4-2ubuntu1~14.04) ...
Setting up libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
(Reading database ... 390295 files and directories currently installed.)
Preparing to unpack .../linux-image-3.16.0-60-generic_3.16.0-60.80~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-60-generic (3.16.0-60.80~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-60-generic_3.16.0-60.80~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.16.0-60-generic' to '/boot/vmlinuz-3.16.0-60-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-60-generic /boot/vmlinuz-3.16.0-60-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-60-generic /boot/vmlinuz-3.16.0-60-generic
Preparing to unpack .../linux-image-3.16.0-53-generic_3.16.0-53.72~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-53-generic (3.16.0-53.72~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-53-generic_3.16.0-53.72~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.16.0-53-generic' to '/boot/vmlinuz-3.16.0-53-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
Preparing to unpack .../libapt-pkg4.12_1.0.1ubuntu2.11_amd64.deb ...
Unpacking libapt-pkg4.12:amd64 (1.0.1ubuntu2.11) over (1.0.1ubuntu2.10) ...
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.16.0-60-generic_3.16.0-60.80~14.04.1_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-53-generic_3.16.0-53.72~14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

它似乎正在尝试将内核更新到 3.16.0-60-generic,但缺少它所依赖的早期内核版本。

除了重新安装和重建系统之外我还能做什么来解决这个问题?

答案1

格式化您的问题后,我可以清楚地看到存在错误:

dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-60-generic_3.16.0-60.80~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.16.0-60-generic' to '/boot/vmlinuz-3.16.0-60-generic.dpkg-new': **failed to write (No space left on device)**
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .

因此您的磁盘空间不足。从具有足够空间的挂载点或磁盘执行此命令。从输出来看,您的 /boot 似乎已满。执行此

du -c -s -h /boot

获取更多信息

在我的其中一台笔记本电脑中,由于 wifi 问题,我需要升级 Linux 内核(Ubuntu Desktop 14.04.3 LTS)。我遵循了以下命令(特定于 4.2.5,因此请根据您的情况查找特定命令):

$ cd /tmp
 $ wget \
 kernel.ubuntu.com/~kernel-ppa/mainline/v4.2.5-wily/linux-headers-4.2.5-040205_4.2.5-040205.201510270124_all.deb \
 kernel.ubuntu.com/~kernel-ppa/mainline/v4.2.5-wily/linux-headers-4.2.5-040205-generic_4.2.5-040205.201510270124_amd64.deb \
 kernel.ubuntu.com/~kernel-ppa/mainline/v4.2.5-wily/linux-image-4.2.5-040205-generic_4.2.5-040205.201510270124_amd64.deb
 $ sudo dpkg -i linux-headers-4.2*.deb linux-image-4.2*.deb

所以你需要做类似的事情。升级内核的更好方法是sudo apt-get 安装 linux-generic-lts-wily

相关内容