探索app小游戏的多样化发展与未来趋势
1700
2022-10-01
could not open directory /lib/modules/4.13.0-43-generic: No such file or directory
今天在更新ubuntu的时候,出现了下面的问题:
➜ ~ sudo apt-get upgrade sudo: unable to resolve host eric-ms-7a54Reading package lists... DoneBuilding dependency tree Reading state information... DoneCalculating upgrade... DoneThe following packages have been kept back: linux-generic linux-generic-hwe-16.04 linux-headers-generic linux-headers-generic-hwe-16.04 linux-image-generic linux-image-generic-hwe-16.04The following packages will be upgraded: linux-firmware1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.Need to get 0 B/50.6 MB of archives.After this operation, 131 kB of additional disk space will be used.Do you want to continue? [Y/n] y(Reading database ... 401730 files and directories currently installed.)Preparing to unpack .../linux-firmware_1.157.23_all.deb ...Unpacking linux-firmware (1.157.23) over (1.157.22) ...dpkg: error processing archive /var/cache/apt/archives/linux-firmware_1.157.23_all.deb (--unpack): trying to overwrite '/lib/firmware/qat_895xcc.bin', which is also in package firmware-misc-nonfree 20161130-5~deb8u1dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)update-initramfs: Generating /boot/initrd.img-4.15.0-99-genericupdate-initramfs: Generating /boot/initrd.img-4.15.0-96-genericupdate-initramfs: Generating /boot/initrd.img-4.13.0-43-genericWARNING: missing /lib/modules/4.13.0-43-genericEnsure all necessary drivers are built into the linux image!depmod: ERROR: could not open directory /lib/modules/4.13.0-43-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: WARNING: could not open /var/tmp/mkinitramfs_PU3zI4/lib/modules/4.13.0-43-generic/modules.order: No such file or directorydepmod: WARNING: could not open /var/tmp/mkinitramfs_PU3zI4/lib/modules/4.13.0-43-generic/modules.builtin: No such file or directoryupdate-initramfs: Generating /boot/initrd.img-4.13.0-37-genericWARNING: missing /lib/modules/4.13.0-37-genericEnsure all necessary drivers are built into the linux image!depmod: ERROR: could not open directory /lib/modules/4.13.0-37-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: WARNING: could not open /var/tmp/mkinitramfs_9PnV1r/lib/modules/4.13.0-37-generic/modules.order: No such file or directorydepmod: WARNING: could not open /var/tmp/mkinitramfs_9PnV1r/lib/modules/4.13.0-37-generic/modules.builtin: No such file or directoryupdate-initramfs: Generating /boot/initrd.img-4.4.0-178-genericErrors were encountered while processing: /var/cache/apt/archives/linux-firmware_1.157.23_all.debE: Sub-process /usr/bin/dpkg returned an error code (1)
解决方法
sudo rm /var/lib/initramfs-tools/4.13.0-37-genericsudo rm /var/lib/initramfs-tools/4.13.0-43-genericsudo dpkg -i --force-overwrite /var/cache/apt/archives/linux-firmware_1.157.23_all.debsudo apt-get -f install
核心思想就是把报错的generic删除,然后强制overwrite就行了
参考文献
[1].update-initramfs missing /lib/modules/4.4.0-13-generic. 处理归档 /var/cache/apt/archives/XXXXXX(--unpack)时出错“的解决方法.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~