我安装了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)这是截图。我真的需要帮助来解决这个问题

发布于 2020-08-27 12:12:26
编辑libc6的postinst
vi /var/lib/dpkg/info/libc6\:amd64.postinst并评论一下这句话
set -e重新运行坏了的修补程序
apt-get --fix-broken installhttps://unix.stackexchange.com/questions/605927
复制相似问题