Ubuntu

升級 linux-headers-server 和 linux-image-server 失敗

  • February 16, 2012

apt-get upgrade告訴我包裹linux-headers-server linux-image-server被保留了,因此這個答案讓我跑了apt-get install linux-headers-server linux-image-server

但是,該命令輸出以下內容:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-server is already the newest version.
linux-image-server is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-server: Depends: linux-image-2.6.32-37-server but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

apt-get -f install:

apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 linux-image-2.6.32-37-server
Suggested packages:
 fdutils linux-doc-2.6.32 linux-source-2.6.32 linux-tools
The following NEW packages will be installed:
 linux-image-2.6.32-37-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/31.8MB of archives.
After this operation, 128MB of additional disk space will be used.
Do you want to continue [Y/n]? 
(Reading database ... 106547 files and directories currently installed.)
Unpacking linux-image-2.6.32-37-server (from .../linux-image-2.6.32-37-server_2.6.32-37.81_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-2.6.32-37-server_2.6.32-37.81_amd64.deb (--unpack):
failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb during `./boot/vmlinuz-2.6.32-37-server': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-32-server
Found initrd image: /boot/initrd.img-2.6.32-32-server
Found linux image: /boot/vmlinuz-2.6.32-31-server
Found initrd image: /boot/initrd.img-2.6.32-31-server
Found linux image: /boot/vmlinuz-2.6.32-30-server
Found initrd image: /boot/initrd.img-2.6.32-30-server
Found linux image: /boot/vmlinuz-2.6.32-28-server
Found initrd image: /boot/initrd.img-2.6.32-28-server
Found linux image: /boot/vmlinuz-2.6.32-25-server
Found initrd image: /boot/initrd.img-2.6.32-25-server
Found linux image: /boot/vmlinuz-2.6.32-24-server
Found memtest86+ image: /memtest86+.bin
done
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-2.6.32-37-server_2.6.32-37.81_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我該怎麼辦?

更新/boot包含以下項目:

-rw-r--r-- 1 root root 631K 2010-09-16 20:55 abi-2.6.32-24-server
-rw-r--r-- 1 root root 632K 2010-10-16 22:51 abi-2.6.32-25-server
-rw-r--r-- 1 root root 632K 2011-01-11 01:42 abi-2.6.32-28-server
-rw-r--r-- 1 root root 632K 2011-03-02 03:02 abi-2.6.32-30-server
-rw-r--r-- 1 root root 632K 2011-04-09 01:07 abi-2.6.32-31-server
-rw-r--r-- 1 root root 632K 2011-04-21 00:53 abi-2.6.32-32-server
-rw-r--r-- 1 root root 108K 2010-09-16 20:55 config-2.6.32-24-server
-rw-r--r-- 1 root root 109K 2010-10-16 22:51 config-2.6.32-25-server
-rw-r--r-- 1 root root 109K 2011-01-11 01:42 config-2.6.32-28-server
-rw-r--r-- 1 root root 109K 2011-03-02 03:02 config-2.6.32-30-server
-rw-r--r-- 1 root root 109K 2011-04-09 01:07 config-2.6.32-31-server
-rw-r--r-- 1 root root 109K 2011-04-21 00:53 config-2.6.32-32-server
drwxr-xr-x 3 root root 6.0K 2011-12-23 10:03 grub
-rw-r--r-- 1 root root 7.9M 2011-01-30 15:55 initrd.img-2.6.32-25-server
-rw-r--r-- 1 root root 7.9M 2011-03-04 12:00 initrd.img-2.6.32-28-server
-rw-r--r-- 1 root root 7.9M 2011-03-24 17:40 initrd.img-2.6.32-30-server
-rw-r--r-- 1 root root 7.9M 2011-05-07 14:59 initrd.img-2.6.32-31-server
-rw-r--r-- 1 root root 7.9M 2011-09-25 10:45 initrd.img-2.6.32-32-server
drwx------ 2 root root  12K 2010-08-16 11:16 lost+found
-rw-r--r-- 1 root root 157K 2010-03-23 10:40 memtest86+.bin
-rw-r--r-- 1 root root 2.1M 2010-10-16 22:51 System.map-2.6.32-25-server
-rw-r--r-- 1 root root 2.1M 2011-01-11 01:42 System.map-2.6.32-28-server
-rw-r--r-- 1 root root 2.1M 2011-03-02 03:02 System.map-2.6.32-30-server
-rw-r--r-- 1 root root 2.1M 2011-04-09 01:07 System.map-2.6.32-31-server
-rw-r--r-- 1 root root 2.1M 2011-04-21 00:53 System.map-2.6.32-32-server
-rw-r--r-- 1 root root 1.4K 2010-09-16 20:58 vmcoreinfo-2.6.32-24-server
-rw-r--r-- 1 root root 1.4K 2010-10-16 22:53 vmcoreinfo-2.6.32-25-server
-rw-r--r-- 1 root root 1.4K 2011-01-11 01:43 vmcoreinfo-2.6.32-28-server
-rw-r--r-- 1 root root 1.4K 2011-03-02 03:08 vmcoreinfo-2.6.32-30-server
-rw-r--r-- 1 root root 1.4K 2011-04-09 01:13 vmcoreinfo-2.6.32-31-server
-rw-r--r-- 1 root root 1.4K 2011-04-21 00:54 vmcoreinfo-2.6.32-32-server
-rw-r--r-- 1 root root 4.0M 2010-09-16 20:55 vmlinuz-2.6.32-24-server
-rw-r--r-- 1 root root 4.0M 2010-10-16 22:51 vmlinuz-2.6.32-25-server
-rw-r--r-- 1 root root 4.0M 2011-01-11 01:42 vmlinuz-2.6.32-28-server
-rw-r--r-- 1 root root 4.0M 2011-03-02 03:02 vmlinuz-2.6.32-30-server
-rw-r--r-- 1 root root 4.0M 2011-04-09 01:07 vmlinuz-2.6.32-31-server
-rw-r--r-- 1 root root 4.0M 2011-04-21 00:53 vmlinuz-2.6.32-32-server

這是錯誤行:

failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb during `./boot/vmlinuz-2.6.32-37-server': No space left on device

您應該執行sudo apt-get autoremove以清理/boot/分區。這應該為您提供足夠的磁碟空間來執行 a sudo apt-get dist-upgrade,這將升級保留的軟體包。完成升級後,您需要重新啟動才能載入新核心。

引用自:https://serverfault.com/questions/343706