每次我尝试使用 apt-get 安装某些东西时,都会收到几个错误。我认为这与下面的输出有关。不幸的是,我记不起在出现这些错误之前我尝试安装的软件包。
sudo dpkg --configure -a
Setting up initramfs-tools (0.122ubuntu8.8) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.4.0-62-generic (4.4.0-62.83) ...
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-62-generic
vmlinuz(/boot/vmlinuz-4.4.0-62-generic
) points to /boot/vmlinuz-4.4.0-62-generic
(/boot/vmlinuz-4.4.0-62-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-62-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-62-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-62-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-62-generic; however:
Package linux-image-4.4.0-62-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-firmware (1.157.8) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-31-generic with 1.
dpkg: error processing package linux-firmware (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up console-setup (1.108ubuntu15.3) ...
/var/lib/dpkg/info/console-setup.config:460: parse error near `}'
dpkg: error processing package console-setup (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-62-generic:
linux-image-extra-4.4.0-62-generic depends on linux-image-4.4.0-62-generic; however:
Package linux-image-4.4.0-62-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-62-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 4.4.0.62.65); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-31-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-62-generic
linux-image-generic
linux-firmware
console-setup
linux-image-extra-4.4.0-62-generic
linux-generic
initramfs-tools
感谢您的帮助!
第一个建议的输出:
➜ ~ sudo apt-get install -f --reinstall plymouth console-setup
[sudo] password for jan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
Need to get 0 B/107 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for console-setup:amd64
第二个技巧没有起作用,仍然是同样的问题。