执行命令时我总是收到此错误消息sudo apt-get upgrade
> apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
owncloud owncloud-3rdparty owncloud-app-activity owncloud-app-external owncloud-app-files
owncloud-app-files-external owncloud-app-files-locking owncloud-app-files-pdfviewer
owncloud-app-files-sharing owncloud-app-files-texteditor owncloud-app-files-trashbin
owncloud-app-files-versions owncloud-app-files-videoviewer owncloud-app-firstrunwizard
owncloud-app-gallery owncloud-app-provisioning-api owncloud-app-templateeditor
owncloud-app-user-external owncloud-app-user-ldap owncloud-app-user-webdavauth
owncloud-config-apache owncloud-server
The following packages will be upgraded:
linux-image-3.2.0-4-amd64
1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
24 not fully installed or removed.
Need to get 0 B/23.4 MB of archives.
After this operation, 17.4 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 51164 files and directories currently installed.)
Preparing to replace linux-image-3.2.0-4-amd64 3.2.65-1+deb7u2 (using .../linux-image-3.2.0-4-amd64_3.2.68-1+deb7u2_amd64.deb) ...
Unpacking replacement linux-image-3.2.0-4-amd64 ...
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.68-1+deb7u2_amd64.deb (--unpack):
cannot copy extracted data for './lib/modules/3.2.0-4-amd64/kernel/drivers/char/tpm/tpm_tis.ko' to '/lib/modules/3.2.0-4-amd64/kernel/drivers/char/tpm/tpm_tis.ko.dpkg-new': failed to write (No space left on device)
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.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.68-1+deb7u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
> df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 322M 231M 75M 76% /
udev 10M 0 10M 0% /dev
tmpfs 368M 236K 368M 1% /run
/dev/mapper/webmail-root 322M 231M 75M 76% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 736M 0 736M 0% /run/shm
/dev/sda1 228M 20M 197M 10% /boot
/dev/mapper/webmail-home 898G 13G 840G 2% /home
/dev/mapper/webmail-tmp 368M 12M 338M 4% /tmp
/dev/mapper/webmail-usr 8.3G 1.3G 6.6G 17% /usr
/dev/mapper/webmail-var 2.8G 1.5G 1.2G 56% /var
/dev/mapper/webmail-home 898G 13G 840G 2% /opt
> uname -r
3.2.0-4-amd64
我正在尝试修复它,但没有成功。
答案1
您收到的错误是由于根分区太小(/
),如消息所述:No space left on device
。
75 MB 似乎不足以解压并安装内核。
最简单的解决方案是释放根分区上的空间或增加其大小。
要释放空间,您可以尝试:
sudo apt-get autoremove
sudo apt-get autoclean
还要检查硬盘上是否还有旧内核,也可以将其删除。
dpkg --list | grep linux-image
请记住仅删除那些您不使用的。