[Newbies] 新人求助,安装内核包出问题
Tofloor
poster avatar
sunlei321
deepin
2021-12-01 16:44
Author

原本是装了ubuntu的一个内核,后来系统出现问题,自己就把系统自带的内核删除了。这下想装回来也不行了。

试过安装其他版本的内核,都是同样的安装失败,有懂得给个建议,谢谢!

sudo apt-get -f install
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
正在设置 linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
正在处理用于 linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) 的触发器 ...
/etc/kernel/postinst.d/dkms:
Error! Bad return status for module build on kernel: 5.3.0-42-generic (x86_64)
Consult /var/lib/dkms/rtw89/1.0.2/build/make.log for more information.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.3.0-42-generic
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/sbin/mkinitramfs: 85: /usr/sbin/mkinitramfs: modinfo: Text file busy
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 202: /usr/share/initramfs-tools/hooks/live: sed: Text file busy
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
setupcon is missing. Please install the 'console-setup' package.
/usr/share/initramfs-tools/hooks/kms: 76: /usr/share/initramfs-tools/hooks/kms: modprobe: Text file busy
W: plymouth: The plugin label.so is missing, the selected theme might not work as expected.
W: plymouth: You might want to install the plymouth-themes package to fix this.
I: The initramfs will attempt to resume from /dev/sdb7
I: (UUID=292408e6-b3a0-4e19-89d6-326c2300686b)
I: Set the RESUME variable to override this.
/usr/share/initramfs-tools/hooks/udev: 203: /usr/share/initramfs-tools/hooks/udev: sed: Text file busy
E: /usr/share/initramfs-tools/hooks/udev failed with return 2.
update-initramfs: failed for /boot/initrd.img-5.3.0-42-generic with 2.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 2
dpkg: 处理软件包 linux-image-unsigned-5.3.0-42-generic (--configure)时出错:
已安装 linux-image-unsigned-5.3.0-42-generic 软件包 post-installation 脚本 子进程返回错误状态 1
在处理时有错误发生:
linux-image-unsigned-5.3.0-42-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
(base) lei@lei-PC:~$ uname -a
Linux lei-PC 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64 GNU/Linux

Reply Favorite View the author
All Replies
sunlei321
deepin
2021-12-01 17:00
#1

(base) lei@lei-PC:$ sudo apt-get update && sudo apt-get dist-upgrade
请输入密码:
验证成功
获取:1 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
命中:2 https://community-packages.deepin.com/deepin apricot InRelease
命中:4 https://community-packages.deepin.com/printer eagle InRelease
获取:5 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,090 B]
命中:6 https://linux.teamviewer.com/deb stable InRelease
命中:7 https://repo.steampowered.com/steam stable InRelease
获取:3 https://home-store-img.uniontech.com/appstore deepin InRelease [6,128 B]
获取:8 https://home-store-img.uniontech.com/appstore deepin/appstore amd64 Packages [1,993 kB]
已下载 2,002 kB,耗时 11秒 (183 kB/s)
正在读取软件包列表... 完成
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在计算更新... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 2 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
正在设置 linux-image-5.10.60-amd64-desktop (5.10.60-3) ...
Error! echo
Your kernel headers for kernel 5.10.60-amd64-desktop cannot be found at
/lib/modules/5.10.60-amd64-desktop/build or /lib/modules/5.10.60-amd64-desktop/source.
Error! echo
Your kernel headers for kernel 5.10.60-amd64-desktop cannot be found at
/lib/modules/5.10.60-amd64-desktop/build or /lib/modules/5.10.60-amd64-desktop/source.
Error! echo
Your kernel headers for kernel 5.10.60-amd64-desktop cannot be found at
/lib/modules/5.10.60-amd64-desktop/build or /lib/modules/5.10.60-amd64-desktop/source.
Error! echo
Your kernel headers for kernel 5.10.60-amd64-desktop cannot be found at
/lib/modules/5.10.60-amd64-desktop/build or /lib/modules/5.10.60-amd64-desktop/source.
update-initramfs: Generating /boot/initrd.img-5.10.60-amd64-desktop
/usr/sbin/mkinitramfs: 85: /usr/sbin/mkinitramfs: modinfo: Text file busy
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/sbin/mkinitramfs: 310: /usr/sbin/mkinitramfs: dirname: Text file busy
cp: 无法创建普通文件'/var/tmp/mkinitramfs_znJ2H0/scripts/./panic/': 不是目录
/usr/sbin/mkinitramfs: 312: /usr/sbin/mkinitramfs: dirname: Text file busy
/usr/share/initramfs-tools/hooks/live: 76: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 76: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 85: /usr/share/initramfs-tools/hooks/live: modinfo: Text file busy
/usr/share/initramfs-tools/hooks/live: 203: /usr/share/initramfs-tools/hooks/live: sed: Text file busy
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
/usr/share/initramfs-tools/hooks/fuse: 76: /usr/share/initramfs-tools/hooks/fuse: modprobe: Text file busy
setupcon is missing. Please install the 'console-setup' package.
W: plymouth: The plugin label.so is missing, the selected theme might not work as expected.
W: plymouth: You might want to install the plymouth-themes package to fix this.
I: The initramfs will attempt to resume from /dev/sdb7
I: (UUID=292408e6-b3a0-4e19-89d6-326c2300686b)
I: Set the RESUME variable to override this.
/usr/share/initramfs-tools/hooks/udev: 202: /usr/share/initramfs-tools/hooks/udev: sed: Text file busy
E: /usr/share/initramfs-tools/hooks/udev failed with return 2.
update-initramfs: failed for /boot/initrd.img-5.10.60-amd64-desktop with 2.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 2
fix systemd/logind config
get rootb uuid error: failed to get "rootb" uuid
正在生成 grub 配置文件 ...
/etc/grub.d/00_header: 242: /etc/grub.d/00_header: cat: Text file busy
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: 处理软件包 linux-image-5.10.60-amd64-desktop (--configure)时出错:
已安装 linux-image-5.10.60-amd64-desktop 软件包 post-installation 脚本 子进程返回错误状态 1
正在处理用于 linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) 的触发器 ...
/etc/kernel/postinst.d/dkms:
Error! Bad return status for module build on kernel: 5.3.0-42-generic (x86_64)
Consult /var/lib/dkms/rtw89/1.0.2/build/make.log for more information.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.3.0-42-generic
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/sbin/mkinitramfs: 76: /usr/sbin/mkinitramfs: modprobe: Text file busy
/usr/sbin/mkinitramfs: 85: /usr/sbin/mkinitramfs: modinfo: Text file busy
/usr/sbin/mkinitramfs: 312: /usr/sbin/mkinitramfs: dirname: Text file busy
/usr/sbin/mkinitramfs: 309: /usr/sbin/mkinitramfs: dirname: Text file busy
/usr/sbin/mkinitramfs: 312: /usr/sbin/mkinitramfs: dirname: Text file busy
/usr/sbin/mkinitramfs: 203: /usr/sbin/mkinitramfs: sed: Text file busy
/usr/share/initramfs-tools/hooks/live: 76: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 75: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 75: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 75: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 75: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 75: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 76: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 76: /usr/share/initramfs-tools/hooks/live: modprobe: Text file busy
/usr/share/initramfs-tools/hooks/live: 203: /usr/share/initramfs-tools/hooks/live: sed: Text file busy
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
setupcon is missing. Please install the 'console-setup' package.
/usr/share/initramfs-tools/hooks/kms: 177: /usr/share/initramfs-tools/hooks/kms: cp: Text file busy
E: /usr/share/initramfs-tools/hooks/kms failed with return 3.
update-initramfs: failed for /boot/initrd.img-5.3.0-42-generic with 3.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 3
dpkg: 处理软件包 linux-image-unsigned-5.3.0-42-generic (--configure)时出错:
已安装 linux-image-unsigned-5.3.0-42-generic 软件包 post-installation 脚本 子进程返回错误状态 1
在处理时有错误发生:
linux-image-5.10.60-amd64-desktop
linux-image-unsigned-5.3.0-42-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
(base) lei@lei-PC:$

Reply View the author
sunlei321
deepin
2021-12-02 08:09
#2

不知道做对了什么?

在appstore里狂删了一堆软件;执行了几遍 sudo dpkg --configure -a ; 重启几遍;安装了新内核包。现在在执行 sudo apt-get -f install 就没什么报错了。仿佛一切都没发生过一样。对于我这个什么不懂,只会粘贴命令不断安装删除的人,世界又恢复了往昔安宁。

(base) lei@lei-PC:$ sudo apt-get -f install
请输入密码:
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
(base) lei@lei-PC:
$ uname -a
Linux lei-PC 5.15.1-amd64-desktop #1 SMP Tue Nov 9 20:32:54 CST 2021 x86_64 GNU/Linux
(base) lei@lei-PC:$ sudo dpkg --configure -a
(base) lei@lei-PC:
$ sudo apt-get remove anbox
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
软件包 anbox 未安装,所以不会被卸载
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
(base) lei@lei-PC:~$

(base) lei@lei-PC:$ sudo apt-get upgrade && sudo apt-get dist-upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在计算更新... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在计算更新... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
(base) lei@lei-PC:
$

究竟发生了什么?

Reply View the author