我对我的机器 lubuntu 22.04 进行了升级但失败了,现在我无法升级或安装任何东西。
user@host:~$ sudo apt remove cmatrix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
cmatrix linux-image-6.5.0-18-generic
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 352555 files and directories currently installed.)
Removing linux-image-6.5.0-18-generic (6.5.0-18.18~22.04.1) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-18-generic (--remove):
installed linux-image-6.5.0-18-generic package post-removal script subprocess returned error exit status 1
Removing cmatrix (2.0-3) ...
Errors were encountered while processing:
linux-image-6.5.0-18-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
此处的 Cmatrix 就是一个例子。
我尝试过sudo dpkg --configure -a
,它告诉我
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Setting up linux-image-6.5.0-41-generic (6.5.0-41.41~22.04.2) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-41-generic (--configure):
installed linux-image-6.5.0-41-generic package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-22.04:
linux-image-generic-hwe-22.04 depends on linux-image-6.5.0-41-generic; however:
Package linux-image-6.5.0-41-generic is not configured yet.
dpkg: error processing package linux-image-generic-hwe-22.04 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-22.04:
linux-generic-hwe-22.04 depends on linux-image-generic-hwe-22.04 (= 6.5.0.41.41~22.04.2); however:
Package linux-image-generic-hwe-22.04 is not configured yet.
dpkg: error processing package linux-generic-hwe-22.04 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-6.5.0-41-generic
linux-image-generic-hwe-22.04
linux-generic-hwe-22.04
也尝试过sudo apt install -f
结果是:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-image-6.5.0-18-generic
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 352545 files and directories currently installed.)
Removing linux-image-6.5.0-18-generic (6.5.0-18.18~22.04.1) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-18-generic (--remove):
installed linux-image-6.5.0-18-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.5.0-18-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我希望有人能帮助我解决这个问题。 谢谢。
禁用符号链接
etc/kernel-img.conf