经过多次尝试自己解决问题后,我决定在这里发布,基本上每次我运行升级时都会收到此错误消息:
fabrizio@fabrix ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.125) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.4.0-38-generic (4.4.0-38.57) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-38-generic
vmlinuz(/boot/vmlinuz-4.4.0-38-generic
) points to /boot/vmlinuz-4.4.0-38-generic
(/boot/vmlinuz-4.4.0-38-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-38-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
Error! echo
Your kernel headers for kernel 4.4.0-38-generic cannot be found at
/lib/modules/4.4.0-38-generic/build or /lib/modules/4.4.0-38-generic/source.
Error! echo
Your kernel headers for kernel 4.4.0-38-generic cannot be found at
/lib/modules/4.4.0-38-generic/build or /lib/modules/4.4.0-38-generic/source.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed
update-initramfs: failed for /boot/initrd.img-4.4.0-38-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-38-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-38-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-38-generic:
linux-image-extra-4.4.0-38-generic depends on linux-image-4.4.0-38-generic; however:
Package linux-image-4.4.0-38-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-38-generic (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.125) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-21-generic
E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed
update-initramfs: failed for /boot/initrd.img-4.4.0-21-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-38-generic
linux-image-extra-4.4.0-38-generic
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试寻找类似的错误,并尝试删除内核、升级 initramfs 和其他操作,但没有成功,你能给我指出正确的方向吗?
fabrizio@fabrix ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 759M 9.5M 750M 2% /run
/dev/sda1 286G 25G 248G 9% /
tmpfs 3.8G 9.0M 3.7G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 759M 32K 759M 1% /run/user/1000
fabrizio@fabrix ~ $ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 965757 531 965226 1% /dev
tmpfs 970893 813 970080 1% /run
/dev/sda1 19038208 500395 18537813 3% /
tmpfs 970893 30 970863 1% /dev/shm
tmpfs 970893 6 970887 1% /run/lock
tmpfs 970893 18 970875 1% /sys/fs/cgroup
cgmfs 970893 14 970879 1% /run/cgmanager/fs
tmpfs 970893 20 970873 1% /run/user/1000
fabrizio@fabrix ~ $ sudo apt-get install busybox busybox-static
Reading package lists... Done
Building dependency tree
Reading state information... Done
busybox-static is already the newest version (1:1.22.0-19ubuntu2).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
busybox : Conflicts: busybox-static but 1:1.22.0-19ubuntu2 is to be installed
busybox-static : Conflicts: busybox
E: Unable to correct problems, you have held broken packages.
答案1
尝试
sudo apt-get install linux-headers-4.4.0-38-generic
sudo apt-get -f install
看看是否能解决问题:)