无法创建‘/usr/src/linux-headers-4.4.0-79/include/linux/reset-controller.h.dpkg-new’

无法创建‘/usr/src/linux-headers-4.4.0-79/include/linux/reset-controller.h.dpkg-new’

我在升级过程中丢失了 Internet 连接。当我尝试再次运行升级时,出现以下错误。

Preparing to unpack .../linux-headers-4.4.0-79_4.4.0-79.100_all.deb ...
Unpacking linux-headers-4.4.0-79 (4.4.0-79.100) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-79_4.4.0-79.100_all.deb (--unpack):
 unable to create '/usr/src/linux-headers-4.4.0-79/include/linux/reset- controller.h.dpkg-new' (while processing './usr/src/linux-headers-4.4.0-79/include/linux/reset-controller.h'):**

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)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-4.4.0-79_4.4.0-79.100_all.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试删除不需要的包:

sudo apt-get autoremove -y

我尝试强制安装:

sudo apt-get install -f 

不过,据 称df -h,仍有可用空间:

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           799M   11M  789M   2% /run
/dev/xvda1      7.8G  5.7G  1.8G  77% /
tmpfs           3.9G  156K  3.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/xvdg        50G   40G   11G  79% /vol1
/dev/xvdf       100G   45G   56G  45% /vol
tmpfs           799M     0  799M   0% /run/user/1000
tmpfs           799M     0  799M   0% /run/user/1006
tmpfs           799M     0  799M   0% /run/user/1009

答案1

sudo dpkg--configure--pending

这显示了问题软件包,然后只需使用以下命令删除所有问题软件包

sudo apt remove sudo apt-get remove linux-headers-4.4.0-79-generic linux-headers-generic linux-headers-virtual linux-virtual

然后运行

sudo apt-get update
sudo apt-get upgrade

这解决了我的问题。

如果有其他解决方案,请告诉我。谢谢

相关内容