写入失败(设备上没有剩余空间)

我正在使用Ubuntu虚拟机并尝试使用sudo apt-get install curl -y

我得到一个回复​​说有没有未满足的依赖关系,并说你可能想运行’apt-get -f install’来纠正这些:

所以,我执行apt-get -f install并遇到一个新问题:

 After this operation, 43.0 MB of additional disk space will be used. (Reading database ... 273817 files and directories currently installed.) Preparing to unpack .../linux-image-3.13.0-91-generic_3.13.0-91.138_amd64.deb ... Done. Unpacking linux-image-3.13.0-91-generic (3.13.0-91.138) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-91-generic_3.13.0-91.138_amd64.deb (--unpack): cannot copy extracted data for './boot/vmlinuz-3.13.0-91-generic' to '/boot/vmlinuz-3.13.0-91-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.13.0-91-generic /boot/vmlinuz-3.13.0-91-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-91-generic /boot/vmlinuz-3.13.0-91-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.13.0-91-generic_3.13.0-91.138_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

基本上,它抱怨设备上没有剩余空间。 df -h确认:

 Filesystem Size Used Avail Use% Mounted on /dev/mapper/ITS--vg-root 38G 18G 18G 51% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 988M 12K 988M 1% /dev tmpfs 201M 540K 200M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1001M 4.0K 1001M 1% /run/shm none 100M 0 100M 0% /run/user /dev/sda1 236M 226M 0 100% /boot 

因此,如果我正确地阅读此内容, apt-get -f install会尝试将43.0 MB的内容写入18G的可用空间。

为什么抱怨空间不足?

你的问题不是18GB免费/

问题是:

 /dev/sda1 236M 226M 0 100% /boot 

软件包安装程序正在使用/boot/vmlinuz-3.13.0-91-generic并且没有可用空间。

您需要增加此分区的大小。

正如安华在一分钟前的评论中所说的那样看: askubuntu.how-do-i-increase-the-size-of-boot

最初我说要看Q&A: askubuntu.com ..how-to-increase-size-of-boot-partition-using-gparted ,这也很有帮助。