ubuntu - 坚持使用 apt --fix-broken install (libc6 :amd64 package post-installation)

标签 ubuntu package apt ubuntu-20.04

我的系统在 WSL 中运行,我至少每隔几天升级一次。
我坚持安装一个软件包,并寻找解决此问题的方法:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libbind9-161 libdns-export1107 libdns1107 libdns1109 libirs161 libisc-export1104 libisc1104 libisc1105 libisccc161
  libisccfg163 liblwres161 liboauth0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libc-bin
The following packages will be upgraded:
  libc-bin
1 upgraded, 0 newly installed, 0 to remove and 882 not upgraded.
6 not fully installed or removed.
Need to get 0 B/633 kB of archives.
After this operation, 8,192 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up libc6:amd64 (2.31-0ubuntu6) ...
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 processing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
接下来我可以尝试什么?

最佳答案

我遇到了同样的问题,这个过程来自 this bug report解决它:

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

and comment out the line

# set -e

so $ apt-get -f install can continue.

关于ubuntu - 坚持使用 apt --fix-broken install (libc6 :amd64 package post-installation),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60944370/

相关文章:

asp.net - 无法在 Ubuntu 上使用 `dnx run` 启动 ASP 应用程序

linux - 集成GPU +外部设备上的cuda

ubuntu - ubuntu中没有vim包怎么安装vi

android-studio - 如何将flutter项目迁移到androidx:任务 ':app:preDebugBuild'执行失败。 > Android依赖项'androidx.versionedparcelable

r - github 包 repo 中是否应该有 'package' 子文件夹

python - 为什么不能添加 PPA 死蛇?

Docker缓存导致误报释放

ubuntu - 无法执行 'i686-linux-gnu-gcc' : No such file or directory

java - 同一级别的 If 语句如何同时在 Android/Java 程序中执行?

python - 为什么使用 apt.Cache 而不是 apt.cache.Cache() 创建对象