ブログアーカイブ
Ubuntu 20.04, libc-bin
WSL2 Ubuntu でapt upgradeを実行すると
error exit status 134
が発生するようになりました。
libc-bin is already the newest version (2.31-0ubuntu9.7).
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 libc-bin (2.31-0ubuntu9.7) ...
Aborted (core dumped)
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib' given more than once
/usr/lib/wsl/lib:
/usr/local/lib:
/lib/x86_64-linux-gnu:
Aborted (core dumped)
dpkg: error processing package libc-bin (--configure):
installed libc-bin package post-installation script subprocess returned error exit status 134
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo mv /var/lib/dpkg/info/libc-bin.* /tmp/
sudo dpkg --remove --force-remove-reinstreq libc-bin
sudo dpkg --purge libc-bin
sudo apt install --reinstall libc-bin
sudo mv /tmp/libc-bin.* /var/lib/dpkg/info/
こちらを実行しても依然としてエラーが発生します。結局アプリをリセットすることで解決しました。
こちらから最新の Linux カーネル更新プログラム パッケージをダウンロード できます。
WSL2, Ubuntu 20.04 LTS
Windows 10 21H2のWSL2 Ubuntu 20.04 LTSで %LocalAppData%\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState の ext4.vhdx は利用されなくなっています。\LocalState\rootfs\ フォルダーにpyファイルなど生成されています。フォルダーのサイズは2GB程度です。Hyper-Vと仮想マシン プラットフォームをチェックした状態です。
Ubuntu OS update
Windows 10のWSL1で sudo do-release-upgrade -d を実行してUbuntu 18.04 LTSから20.04 LTSにOSをアップデートしたところ次のエラーが発生するようになりました。
User@PC-Name: $ sudo apt-get update Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done User@PC-Name: $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libc-bin : Depends: libc6 (< 2.28) but 2.31-0ubuntu9 is installed locales : Depends: libc-bin (> 2.31) but 2.27-3ubuntu1 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt –fix-broken install を実行しても依然として
Errors were encountered while processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
が表示されます
cd /tmp
wget https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo apt-mark hold libc6
sudo apt --fix-broken install
sudo apt full-upgrade
再度sudo apt-get upgradeを実行すると次のエラーが発生する場合があります。
sleep: cannot read realtime clock: Invalid argument
dpkg: error processing package libc6:amd64 (--configure):
installed libc6:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
libc6:amd64
Stuck with apt –fix-broken install (libc6:amd64 package post-installation)
https://stackoverflow.com/questions/60944370/stuck-with-apt-fix-broken-install-libc6amd64-package-post-installation
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
sudo mkdir /var/lib/dpkg/info
sudo apt-get update && sudo apt-get -f install