ubuntu装包遇到 dracut: dracut module 'ifcfg' cannot be found or installed. 报错,修复方法

完整报错

apt-get remove  dracut
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'dracut' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-5.15.0-60-generic (5.15.0-60.66) ...
Processing triggers for linux-image-5.15.0-60-generic (5.15.0-60.66) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-60-generic
   ...done.
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-5.15.0-60-generic
dracut: dracut module 'ifcfg' cannot be found or installed.
run-parts: /etc/kernel/postinst.d/dracut exited with return code 1
dpkg: error processing package linux-image-5.15.0-60-generic (--configure):
 installed linux-image-5.15.0-60-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.15.0-60-generic
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

以上报错,在安装,卸载,更新 都会报错;简直了..
ps: 网上搜索了一圈没有找到相同问题;
本来找ifcfg这个模块,找半天也没找到 <!.!>

解决方法

apt install dracut-network

以上就解决这个报错了. PS:一直没想明白是怎么把这个模块搞没得....

posted @ 2023-02-17 05:06  lvusyy  阅读(353)  评论(0编辑  收藏  举报