적절한 업그레이드 패키지 linux-image-5.13.0-41-generic 오류

적절한 업그레이드 패키지 linux-image-5.13.0-41-generic 오류

실행 후:

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은 오류로 가득 차 있었고 알 수 없는 경로를 제거하면 문제를 해결할 수 있었습니다.

관련 정보