
我在升級時看到了一堆錯誤,所以我重新啟動了。現在,如果我嘗試啟動最新的內核,系統就會掛起。我啟動到舊核心的恢復模式並嘗試刪除所有 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
就像邁克一樣,我在重試之前將最舊的文件移動到:
$ 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,因為我的所有擴充都不相容...