![Ошибка при обновлении пакета apt linux-image-5.13.0-41-generic](https://rvso.com/image/1072200/%D0%9E%D1%88%D0%B8%D0%B1%D0%BA%D0%B0%20%D0%BF%D1%80%D0%B8%20%D0%BE%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B8%20%D0%BF%D0%B0%D0%BA%D0%B5%D1%82%D0%B0%20apt%20linux-image-5.13.0-41-generic.png)
После запуска:
sudo apt update
&
sudo apt upgrade
Я получаю следующую ошибку:
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.13.0-41-generic linux-hwe-5.13-headers-5.13.0-41
linux-image-5.13.0-41-generic linux-modules-5.13.0-41-generic
linux-modules-extra-5.13.0-41-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 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 linux-image-5.13.0-48-generic (5.13.0-48.54~20.04.1) ...
Processing triggers for linux-image-5.13.0-48-generic (5.13.0-48.54~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-48-generic
/etc/kernel/postinst.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 52: .: Can't open /usr/local/share/openocd/grub-mkconfig_lib
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-48-generic (--configure):
installed linux-image-5.13.0-48-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.13.0-48-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
У меня также есть run apt autoremove
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-5.13.0-41-generic linux-hwe-5.13-headers-5.13.0-41
linux-image-5.13.0-41-generic linux-modules-5.13.0-41-generic
linux-modules-extra-5.13.0-41-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 508 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 295730 files and directories currently installed.)
Removing linux-headers-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
Removing linux-hwe-5.13-headers-5.13.0-41 (5.13.0-41.46~20.04.1) ...
Removing linux-modules-extra-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
Removing linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-41-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 52: .: Can't open /usr/local/share/openocd/grub-mkconfi
g_lib
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-41-generic (--remove):
installed linux-image-5.13.0-41-generic package post-removal script subprocess
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.13.0-41-generic
Processing was halted because there were too many errors.
что я также попытался исправить с помощью sudo apt --fix-broken install
:
this the same results:
eading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-unsigned-5.13.0-41-generic
Suggested packages:
fdutils linux-doc | linux-hwe-5.13-source-5.13.0 linux-hwe-5.13-tools
linux-headers-5.13.0-41-generic linux-modules-extra-5.13.0-41-generic
The following packages will be REMOVED:
linux-image-5.13.0-41-generic
The following NEW packages will be installed:
linux-image-unsigned-5.13.0-41-generic
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 10.1 MB of archives.
After this operation, 283 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://es.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-image-unsigned-5.13.0-41-generic amd64 5.13.0-41.46~20.04.1 [10.1 MB]
Fetched 10.1 MB in 1s (8,361 kB/s)
dpkg: linux-image-5.13.0-41-generic: dependency problems, but removing anyway as
you requested:
linux-modules-5.13.0-41-generic depends on linux-image-5.13.0-41-generic | linu
x-image-unsigned-5.13.0-41-generic; however:
Package linux-image-5.13.0-41-generic is to be removed.
Package linux-image-unsigned-5.13.0-41-generic is not installed.
(Reading database ... 262041 files and directories currently installed.)
Removing linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-41-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 52: .: Can't open /usr/local/share/openocd/grub-mkconfi
g_lib
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-41-generic (--remove):
installed linux-image-5.13.0-41-generic package post-removal script subprocess
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.13.0-41-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Будем весьма признательны за любые рекомендации по устранению этой проблемы.
решение1
У меня возникла проблема с переменными среды после установки Zsh и моей собственной настройки скриптов профилей оболочки; pkgdatadir был полон ошибок, и удаление неизвестных путей позволило решить эту проблему.