![尝试卸载/重新安装 git 时出错](https://linux22.com/image/943882/%E5%B0%9D%E8%AF%95%E5%8D%B8%E8%BD%BD%2F%E9%87%8D%E6%96%B0%E5%AE%89%E8%A3%85%20git%20%E6%97%B6%E5%87%BA%E9%94%99.png)
在从 github 提取更新时出错后,我尝试重新安装 git。我发现 libc-bin 存在错误。有人能给我指点一下吗?提前谢谢,安装 git 命令的完整输出如下。
sudo apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following packages will be upgraded:
git
1 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
1 not fully installed or removed.
Need to get 0 B/4554 kB of archives.
After this operation, 0 B of additional disk space will be used.
Setting up libc-bin (2.31-0ubuntu9.2) ...
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/x86_64-linux-gnu/libfakeroot:
libfakeroot-0.so -> libfakeroot-tcp.so
/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)
答案1
首先,从删除安装后文件开始,libc-bin
因为它们可能已损坏。
sudo mv /var/lib/dpkg/info/libc-bin* ~/
之后重新安装libc-bin
并git
:
sudo apt update && sudo apt --fix-broken install && sudo apt install libc-bin && sudo apt install git
请随意在评论中问我任何问题。