Tips
WSLでUbuntu 22.04 LTS実行し、インストールやアップグレードを行うと下記のようなエラーが出ることがあります。
Scanning linux images... Failed to retrieve available kernel versions. Failed to check for processor microcode upgrades. No services need to be restarted. No containers need to be restarted. User sessions running outdated binaries: root @ /dev/pts/0: apt[399,1563] No VM guests are running outdated hypervisor (qemu) binaries on this host.
何でしょうねこれ。Kernel?マイクロコード?
WSL2の仕様の問題のようです。
-
windows subsystem for linux - Ubuntu 22.04 LTS on WSL: "Failed to retrieve available kernel versions"/"Failed to check for processor microcode upgrades" when installing packages - Ask Ubuntu
I just installed Ubuntu 22.04 LTS for Windows Subsystem for Linux, but I'm having some issues. Every ...
askubuntu.com
これはインストールが失敗しているわけではなく、それぞれ確認できないことにメッセージが出ています。
これを表示させない方法として下記のコマンドを実行します。
needrestart: check which daemons need to be restarted after library upgrades needrestart:ライブラリのアップグレード後に再起動する必要があるデーモンを確認します
# apt purge needrestart Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: fontconfig-config fonts-dejavu-core libdeflate0 libfontconfig1 libfreetype6 libgd3 libintl-perl libintl-xs-perl libjbig0 libjpeg-turbo8 libjpeg8 libmodule-find-perl libmodule-scandeps-perl libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip2 libproc-processtable-perl libsort-naturally-perl libterm-readkey-perl libtiff5 libwebp7 libxpm4 nginx-common nginx-core Use 'apt autoremove' to remove them. The following packages will be REMOVED: needrestart* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 512 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 34124 files and directories currently installed.) Removing needrestart (3.5-5ubuntu2) ... Processing triggers for man-db (2.10.2-1) ... (Reading database ... 34069 files and directories currently installed.) Purging configuration files for needrestart (3.5-5ubuntu2) ...
以上でエラーが出なくなります。