升级时我看到一堆错误,所以我就重启了。现在,如果我尝试启动最新的内核,系统就会挂起。我启动到旧内核的恢复模式,并尝试删除所有 nvidia 软件包,因为我记得有些错误提到了 nvidia,但这似乎不起作用。
我现在可以启动5.4.0-125-generic
(最新安装的是 5.15.0-46-generic),但是看起来旧的软件包(linux-image-extra-4.4.0-47-generic)导致了错误:
$ apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
[...lots of packages...]
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-extra-4.4.0-47-generic
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 718568 files and directories currently installed.)
Removing linux-image-extra-4.4.0-47-generic (4.4.0-47.68) ...
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
* dkms: running auto installation service for kernel 4.4.0-47-generic
Error! Your kernel headers for kernel 4.4.0-47-generic cannot be found.
Please install the linux-headers-4.4.0-47-generic package or use the --kernelsourcedir option to tell DKMS where it's located.
[ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic
cp: failed to access '/var/tmp/mkinitramfs_Gr84ph//usr/sbin/reiserfsck': Too many levels of symbolic links
modinfo: ERROR: could not get modinfo from 'crc32': No such file or directory
ln: failed to create symbolic link '/var/tmp/mkinitramfs_Gr84ph/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_Gr84ph//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-47-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-47-generic (--remove):
installed linux-image-extra-4.4.0-47-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-extra-4.4.0-47-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我尝试linux-headers-4.4.0-47-generic
使用 apt 安装时,出现以下信息:
Package linux-headers-4.4.0-47-generic is not available, but is referred to by another package.
所以我从 Launchpad 下载linux-headers-4.4.0-47
并安装了它们,但我仍然收到Too many levels of symbolic links
错误。我似乎也无法运行它们update-initramfs
。
# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_6mJRpW//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_6mJRpW/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_6mJRpW//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.
下面是输出dpkg --configure -a
Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_1kW62F//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_1kW62F/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_1kW62F//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-46-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
cp: failed to access '/var/tmp/mkinitramfs_n2elsy//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_n2elsy/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_n2elsy//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-46-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-46-generic (--configure):
installed linux-image-5.15.0-46-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
usrmerge
initramfs-tools
linux-image-5.15.0-46-generic
答案1
我似乎已经修复了它。
首先,我想到强制删除linux-image-extra-4.4.0-47-generic
,这似乎是问题的核心。我发现这个问题并执行以下操作:
mv /var/lib/dpkg/info/linux-image-extra-4.4.0-47-generic.* /tmp
dpkg --remove --force-remove-reinstreq linux-image-extra-4.4.0-47-generic
然后我尝试做一个apt -f install
,但仍然有包创建错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_cvAKA2//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_cvAKA2/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_cvAKA2//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-46-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
cp: failed to access '/var/tmp/mkinitramfs_eni8Bm//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_eni8Bm/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_eni8Bm//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-46-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-46-generic (--configure):
installed linux-image-5.15.0-46-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
usrmerge
initramfs-tools
linux-image-5.15.0-46-generic
然后我尝试删除这些软件包然后重新initramfs-tools
安装usrmerge
:
apt remove initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
brltty brltty-x11 cryptsetup-initramfs initramfs-tools linux-image-4.4.0-47-generic
0 upgraded, 0 newly installed, 5 to remove and 10 not upgraded.
3 not fully installed or removed.
After this operation, 64.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 745215 files and directories currently installed.)
Removing linux-image-4.4.0-47-generic (4.4.0-47.68) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
dkms: removing: virtualbox 6.1.34 (4.4.0-47-generic) (x86_64)
Module virtualbox-6.1.34 for kernel 4.4.0-47-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-47-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
you may need to re-run your boot loader[grub]
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
Removing cryptsetup-initramfs (2:2.4.3-1ubuntu1.1) ...
update-initramfs: deferring update (trigger activated)
Removing brltty-x11 (6.4-4ubuntu3) ...
Removing brltty (6.4-4ubuntu3) ...
Removing initramfs-tools (0.140ubuntu13) ...
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-46-generic
...done.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Errors were encountered while processing:
usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
# apt remove usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
usrmerge
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 205 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 743948 files and directories currently installed.)
Removing usrmerge (25ubuntu2) ...
最后,apt -f install
没有产生任何错误:
root@local:~# apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
因此我尝试重新安装 usrmerge:
# apt install usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
usrmerge
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 54.7 kB of archives.
After this operation, 205 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 usrmerge all 25ubuntu2 [54.7 kB]
Fetched 54.7 kB in 1s (66.4 kB/s)
Selecting previously unselected package usrmerge.
(Reading database ... 743946 files and directories currently installed.)
Preparing to unpack .../usrmerge_25ubuntu2_all.deb ...
Unpacking usrmerge (25ubuntu2) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
执行/usr/lib/usrmerge/convert-usrmerge
仍然出现相同的错误,因此我将两个冲突文件中最旧的文件移动到/tmp
root@local:~# ls -l /lib/libASEP11.so
lrwxrwxrwx 1 root root 32 Apr 30 2021 /lib/libASEP11.so -> /usr/lib/x86-athena/libASEP11.so
root@local:~# ls -l /usr/lib/libASEP11.so
-rw-r--r-- 1 root root 6559107 Jan 28 2020 /usr/lib/libASEP11.so
root@local:~# ls /usr/lib/x86-athena/libASEP11.so -l
-rwxrwxrwx 1 root root 15145705 Sep 8 2019 /usr/lib/x86-athena/libASEP11.so
root@local:~# mv /lib/libASEP11.so /tmp/lib-libASEP11.so~
然后我可以重新安装这两个包:
root@local:~# apt install usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
usrmerge is already the newest version (25ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up usrmerge (25ubuntu2) ...
root@local:~# apt install initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
initramfs-tools
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 9,036 B of archives.
After this operation, 151 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 initramfs-tools all 0.140ubuntu13 [9,036 B]
Fetched 9,036 B in 0s (25.2 kB/s)
Selecting previously unselected package initramfs-tools.
(Reading database ... 743972 files and directories currently installed.)
Preparing to unpack .../initramfs-tools_0.140ubuntu13_all.deb ...
Unpacking initramfs-tools (0.140ubuntu13) ...
Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
但是,当我启动 5.15.0-46 内核时,出现了以下消息Kernel Panic - not syncing: VFS: Unable to mount root fs
。因此,我启动了一个较旧的内核并重新安装了它:
root@local:~# apt reinstall linux-image-5.15.0-46-generic linux-modules-extra-5.15.0-46-generic linux-headers-5.15.0-46-generic linux-modules-5.15.0-46-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 6 not upgraded.
Need to get 101 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-5.15.0-46-generic amd64 5.15.0-46.49 [2,836 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-5.15.0-46-generic amd64 5.15.0-46.49 [11.4 MB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-5.15.0-46-generic amd64 5.15.0-46.49 [22.7 MB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-extra-5.15.0-46-generic amd64 5.15.0-46.49 [63.9 MB]
Fetched 101 MB in 8s (13.0 MB/s)
(Reading database ... 743984 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-headers-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-image-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-image-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-modules-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-modules-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-modules-extra-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-modules-extra-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Setting up linux-headers-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-46-generic
...done.
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up linux-modules-5.15.0-46-generic (5.15.0-46.49) ...
Setting up linux-modules-extra-5.15.0-46-generic (5.15.0-46.49) ...
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-46-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
现在看来一切都进展顺利。
答案2
有趣。我注意到了错误,安装过程告诉我这是完毕但遇到了错误。因此在重启之前,我决定仔细调查一下。
我注意到无法创建新内核并考虑运行:
$ sudo update-initramfs -c -k 5.15.0-72-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-211-generic
cp: failed to access '/var/tmp/mkinitramfs_JmyAEB//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_JmyAEB/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_JmyAEB//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.15.0-211-generic with 1.
但是,正如我们所看到的,发生了相同的“符号链接过多”错误。这就是我找到此页面的方式。(您可以5.15.0-72-generic
使用 找到内核的确切版本,即该部分ls /boot
。)
当尝试重新运行配置时,我遇到了类似的错误,只不过我的致命错误是关于mtp-probe
:
(注意:安装过程停止时,会提示“已完成”,但遇到错误。我必须点击ENTER一次才能退出apt-get
,以便释放锁,然后我才能apt-get
在另一个控制台中运行)。
$ sudo apt-get install -f
[...]
FATAL ERROR:
Both /lib/udev/mtp-probe and /usr/lib/udev/mtp-probe exist.
[...]
/tmp
因此,像 Mike 一样,我在再次尝试之前将最旧的文件移动到:
$ ls -l /lib/udev/mtp-probe /usr/lib/udev/mtp-probe
-rwxr-xr-x 1 root root 14488 Mar 24 2022 /lib/udev/mtp-probe
-rwxr-xr-x 1 root root 31272 Feb 28 2020 /usr/lib/udev/mtp-probe
$ sudo mv /usr/lib/udev/mtp-probe /tmp
删除第一个文件后,另一个文件产生错误:
FATAL ERROR:
Both /lib/udev/rules.d/69-libmtp.rules and /usr/lib/udev/rules.d/69-libmtp.rules exist.
这次内核是在下一个之后构建的apt-get install -f
。然而,与MPI的连接仍然存在错误。
[...]
Setting up openmpi-bin (4.1.2-2ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/mpi corrupt: slave link same as main link /usr/bin/mpicc
dpkg: error processing package openmpi-bin (--configure):
[...]
所以让我们再做一次……只是这一次,查看文件,它们的日期几乎相同
$ ls -l /var/lib/dpkg/alternatives/mpi /usr/bin/mpicc
lrwxrwxrwx 1 root root 23 May 18 00:03 /usr/bin/mpicc -> /etc/alternatives/mpicc
rw-r--r-- 1 root root 2041 May 18 00:03 /var/lib/dpkg/alternatives/mpi
$ ls -l /etc/alternatives/mpicc
lrwxrwxrwx 1 root root 22 May 18 00:03 /etc/alternatives/mpicc -> /usr/bin/mpicc.openmpi
$ ls -l /usr/bin/mpicc.openmpi
lrwxrwxrwx 1 root root 12 Mar 4 2022 /usr/bin/mpicc.openmpi -> opal_wrapper
$ ls -l /usr/bin/opal_wrapper
-rwxr-xr-x 1 root root 26944 Mar 4 2022 /usr/bin/opal_wrapper
这没什么意义。所以我查看了内容,/var/lib/dpkg/alternatives/mpi
认出了我以前遇到过问题的文件。我碰巧有这一页谈论它。我们必须隐藏该替代文件,如下所示:
$ sudo mv /var/lib/dpkg/alternatives/mpi /var/lib/dpkg/alternatives/mpi.hide
下一步apt-get install -f
没有错误地完成,我收到一条消息,说正在运行的内核是错误的/意外的(20.04 内核...),然后它让我重新启动守护进程。照常。所以我觉得最后还是成功了。
为了以防万一,我apt-get
又运行了一次,但仍然有几个包没有完全安装:
sudo apt-get dist-upgrade
不过,目前我还没有运行该autoremove
命令。这样我就可以保留一个旧内核,以防万一,尽管我当然希望以后再也不需要它了!
重新启动时间...
它重新启动了!:-)
现在修复 Gnome,因为我的所有扩展都不兼容......