我无法在 Ubuntu 上安装程序,错误子进程已安装,安装后脚本返回错误退出状态 2

我无法在 Ubuntu 上安装程序,错误子进程已安装,安装后脚本返回错误退出状态 2

请帮忙,我无法安装或卸载程序,错误是:

installArchives() failed: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 192274 files and directories currently installed.)
Removing linux-image-extra-3.5.0-25-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
update-initramfs: Deleting /boot/initrd.img-3.5.0-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
/usr/sbin/grub-probe: error: failed to get canonical path of /cow.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.5.0-25-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.5.0-25-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 linux-image-extra-3.5.0-25-generic
Error in function: 
Setting up linux-image-3.5.0-25-generic (3.5.0-25.39) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.5.0-25-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
update-initramfs: Generating /boot/initrd.img-3.5.0-25-generic
cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic
/usr/sbin/grub-probe: error: failed to get canonical path of /cow.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.5.0-25-generic.postinst line 1010.
dpkg: error processing linux-image-3.5.0-25-generic (--configure):
 subprocess installed post-installation script returned error exit status 2

答案1

尝试运行

sudo update-grub

如果你得到:failed to get canonical path of /cow

跟随此程序

相关内容