无法更新 initramfs 生成 /boot/initrd.img-3.16.0-4-amd64 错误

无法更新 initramfs 生成 /boot/initrd.img-3.16.0-4-amd64 错误

大家好,今天我在这之后对我的 Debian 进行了升级。确实有问题我正在寻找这个问题的解决方案,但我没有找到任何东西。此处出错

Configurando linux-image-3.16.0-4-amd64 (3.16.7-ckt20-1+deb8u4) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-4-amd64
cp: no se puede efectuar `stat' sobre «/etc/udev/udev.conf»: No existe el fichero o el directorio
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.16.0-4-amd64 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-3.16.0-4-amd64.postinst line 634.
dpkg: error al procesar el paquete linux-image-3.16.0-4-amd64 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
Se encontraron errores al procesar:
 linux-image-3.16.0-4-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

COMAND 的新问题:

sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall udev

拥有这个:

E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
Configurando udev (215-17+deb8u3) ...
update-initramfs: deferring update (trigger activated)
insserv: fopen(/etc/insserv.conf): No such file or directory
insserv: Service mountkernfs has to be enabled to start service udev
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error al procesar el paquete udev (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
Procesando disparadores para initramfs-tools (0.120) ...
update-initramfs: Generating /boot/initrd.img-3.16.0-4-amd64
Se encontraron errores al procesar:
 udev

答案1

您可以尝试恢复默认udev.conf。后

mv /etc/udev/udev.conf /etc/udev/udev.conf.broken

(如果文件确实存在,但由于其他原因而无法读取,例如指向无处的符号链接)

apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall udev

(显然对于某些软件包,有必要以 UCF_FORCE_CONFFMISS=1 为前缀,高兴。但我不认为 udev 软件包使用 ucf)。


但是,如果这不仅仅是影响一个文件的意外,您可能最好对想要保留的任何内容进行备份,然后重新安装整个操作系统。

你不知道是什么原因造成的;我想不出任何明显的事情。如果您尝试一次修复一个文件,您可能会错过一些稍后会神秘损坏的文件。

不幸的是,没有一种简单的方法可以在正在运行的系统中重新安装所有软件包。例如aptitude reinstall ?installed- 它因类似的事情而失败Couldn't configure perl-base, probably a dependency cycle

相关内容