![apt アップグレード パッケージ linux-image-5.13.0-41-generic でエラーが発生しました](https://rvso.com/image/1072200/apt%20%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89%20%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8%20linux-image-5.13.0-41-generic%20%E3%81%A7%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%8C%E7%99%BA%E7%94%9F%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F.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 にエラーが多数発生し、不明なパスを削除することで問題を解決できました。