
私は Ubuntu 22.04 (Jammy Jellyfish) を使っていますが、今日 21.10 からアップグレードしました。私のマシンは Asus Vivobook K3500PH で、Intel i7 11 世代プロセッサ、Nvidia GTX 1650 Max-Q グラフィック カードを搭載しています。私のシステムは元々 Linux 5.15 カーネルを使用していましたが、最近 5.13 カーネルからアップグレードしました。
編集: このスレッドは、新しいカーネルをインストールせずに Ubuntu 22.04 にアップグレードした人にも適用されます。
背景情報
Wi-Fi ドライバーに問題があるため、この5.17.4
記事の執筆時点で最新の Linux カーネルにアップグレードしたいと考えています。
私は見つけたガイドオンラインでカーネルの.debファイルをインストールしましたhttps://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17.4/amd64/その後、 を実行しsudo dpkg -i *.deb
、.deb
ダウンロードしたファイルをインストールしました。
エラーが発生しました
インストールに失敗しました
Reading database ... 224038 files and directories currently installed.)
Preparing to unpack linux-headers-5.17.4-051704_5.17.4-051704.202204200842_all.deb ...
Unpacking linux-headers-5.17.4-051704 (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Preparing to unpack linux-headers-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-headers-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Preparing to unpack linux-image-unsigned-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
/var/lib/dpkg/info/linux-image-unsigned-5.17.4-051704-generic.postrm ... removing pending trigger
Preparing to unpack linux-modules-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-modules-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Setting up linux-headers-5.17.4-051704 (5.17.4-051704.202204200842) ...
Setting up linux-headers-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.17.4-051704-generic
...done.
Setting up linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
Setting up linux-modules-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
Processing triggers for linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.17.4-051704-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.17.4-051704-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p5
I: (UUID=11ad606c-1f98-4dc1-b567-9b3fe528bd2e)
I: Set the RESUME variable to override this.
/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.17.4-051704-generic
Found initrd image: /boot/initrd.img-5.17.4-051704-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Found linux image: /boot/vmlinuz-5.13.0-40-generic
Found initrd image: /boot/initrd.img-5.13.0-40-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-unsigned-5.17.4-051704-generic (--install):
installed linux-image-unsigned-5.17.4-051704-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-unsigned-5.17.4-051704-generic
から/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
、ライブラリが不足している可能性があると推測しました。これStack Exchange の投稿に従って、必要なライブラリをインストールしました。
apt
ただし、試したどのパッケージでも、を実行するたびにこのエラー ログが表示されます。
The following packages will be REMOVED:
linux-image-5.13.0-19-generic
........
Fetched 140 kB in 2s (80.2 kB/s)
(Reading database ... 224038 files and directories currently installed.)
Removing linux-image-5.13.0-19-generic (5.13.0-19.19) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-19-generic
/etc/kernel/postrm.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.17.4-051704-generic
Found initrd image: /boot/initrd.img-5.17.4-051704-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Found linux image: /boot/vmlinuz-5.13.0-40-generic
Found initrd image: /boot/initrd.img-5.13.0-40-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-19-generic (--remove):
installed linux-image-5.13.0-19-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-19-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
壊れているようなapt
ので、ライブラリやソフトウェアをインストールできません。
どちらのエラーも が不足していることを示しているlibcrypto....
ため、これがエラーである可能性があります。この問題を解決し、新しい Linux カーネル バージョンをインストールするにはどうすればよいでしょうか?
編集: 表示https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1969353詳細については。
答え1
新しいカーネルをインストールせずに、20.04 から 22.04 にアップグレードした後で、同じ問題が発生しました。
行方不明libcrypto.so.1.1の一部であるlibssl1.1問題を修正するにはこれをインストールする必要があります。この場合aptは壊れていますが、ディストリビューションの正しい.debを手動でダウンロードし、dpkgを使用してインストールすることができます。たとえば、私はamd64バージョンを直接ダウンロードしました。パッケージそしてそれをインストールしました
sudo dpkg -i libssl1.1*.deb
その後、apt を再び使用できるようになります。
これをやってみて、Ubuntu パッケージ リポジトリUbuntu 22.04ではlibssl1.1のインストール候補が提供されておらず、libssl3のみが提供されているようです。これが問題の核心である可能性があります。アップグレード前のバージョンのものも使用できるはずです。ただし、パッケージ私にとってはうまくいきました。
答え2
libssl1.1 を手動でインストールすると問題も解決しました:
wget http://debian.mirror.ac.za/debian/pool/main/o/openssl/libssl1.1_1.1.1o-1_amd64.deb
sudo dpkg -i libssl1.1_1.1.1o-1_amd64.deb
また、上記の URL が 404 になった場合に備えて、更新された URL を取得できる場所は次のとおりです。
答え3
私の場合、問題の原因はgrub-customizer
22.04にアップグレードしたときに失われたことでした。同じ問題を抱えていた場合は、この解決策の方が良いかもしれません(クレジットはvachaj11さんによるものです)https://ubuntuforums.org/showthread.php?t=2474284&page=2&p=14095298#post14095298)
1. grub-customizerを再インストールする
ソース PPA を手動で追加する必要があります。これは、次のコマンドを実行して実行できます。
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
次のコマンドを使用して grub-customizer をインストールします。
sudo apt install grub-customizer
apt は をインストールする前に、まず壊れた linux-image... パッケージを削除しようとするため (失敗し、プロセス全体が終了)、これが失敗する可能性がありますgrub-customizer
。その場合は、 ではなく、パッケージ linux-image... を一時的にアンインストール済みとしてフラグ付けする必要があります。たとえば、 の対応するエントリをからにhalf-installed
直接変更することでこれを行うことができます。次のコマンドを使用して gedit で開きます。/var/lib/dpkg/status
half-installed
config-files
sudo gedit /var/lib/dpkg/status
を検索しますlinux-image-5.13.0-46-generic
(バージョンが異なる可能性があります。アンインストールできないパッケージです)。行末から をStatus:
削除しhalf-installed
て に置き換えますconfig-files
。次に、ファイルを保存して次の操作を行います。
sudo apt install grub-customizer
必ず完了するはずです。
2. grub-customizerを開く
何らかの理由で grub が壊れている場合は、修復します。私の場合、grub-customizer を開いた後、grub を更新するオプションが表示され、それに従いました。また、必要に応じて並べ替えました。また、他の作業の中でも、以前見た grub 内の重複エントリがマージされました。
3. 壊れたパッケージをアンインストールする
以前に linux-image... のステータスを に変更した場合はconfig-files
、 に戻して、half-installed
apt が何かが壊れていることを認識できるようにする必要があります。次に、次を実行します。
sudo apt autoremove
最終的にパッケージが削除されるはずです。
答え4
libssl1.1 を手動でインストールすると問題が解決します。
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb