libc6:amd64の処理中にエラーが発生しました。

libc6:amd64の処理中にエラーが発生しました。

WSL Kali Linuxをインストールした後、入ってアップグレードにapt-get update入ったときにapt-get dist-upgradeこのような内容を見ました。

$ sudo apt-get dist-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:
 bsdmainutils : Depends: calendar but it is not installed
                Depends: ncal but it is not installed
 libc-bin : Depends: libc6 (< 2.31) but 2.31-2 is installed
            Recommends: manpages but it is not installed 
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

これを試しましたが、apt --fix-broken installエラーメッセージが表示され続けます。

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  calendar cpp cpp-9 libc-bin libisl22 libmpc3 libmpfr6 ncal
Suggested packages:
  cpp-doc gcc-9-locales
Recommended packages:
  manpages
The following NEW packages will be installed:
  calendar cpp cpp-9 libisl22 libmpc3 libmpfr6 ncal
The following packages will be upgraded:
  libc-bin
1 upgraded, 7 newly installed, 0 to remove and 67 not upgraded.
6 not fully installed or removed.
Need to get 0 B/13.4 MB of archives.
After this operation, 34.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libc6:amd64 (2.31-2) ...
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
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 procesing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

ここにスクリーンショットがあります。この問題を解決するのに本当に助けが必要です。

エラースクリーンショット

ベストアンサー1

libc6のpostinst編集

vi /var/lib/dpkg/info/libc6\:amd64.postinst

そしてその行をコメントアウトしてください

set -e

破損したプログラムを修復するには、もう一度実行してください。

apt-get --fix-broken install

おすすめ記事