我试图在Ubuntu18.04中安装Git,但是它失败了。下面是我使用的命令:
sudo apt install git下面是显示的错误:
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:
git : Depends: liberror-perl but it is not going to be installed
Depends: git-man (> 1:2.17.1) but it is not going to be installed
Depends: git-man (< 1:2.17.1-.) but it is not going to be installed
Recommends: less but it is not going to be installed
libegl1 : Depends: libglvnd0 (= 1.0.0-2ubuntu2.2) but 1.0.0-2ubuntu2.3 is to be installed
libgles2 : Depends: libglvnd0 (= 1.0.0-2ubuntu2.2) but 1.0.0-2ubuntu2.3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).我尝试过以下命令,但没有帮助。
sudo apt-get update
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update && sudo apt-get upgrade
sudo dpkg --configure -a
sudo apt-get install -f下面是sudo apt --fix-broken install的日志
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libegl1 libgles2
The following packages will be upgraded:
libegl1 libgles2
2 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Need to get 0 B/44.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 102811 files and directories currently installed.)
Preparing to unpack .../libegl1_1.0.0-2ubuntu2.3_arm64.deb ...
Unpacking libegl1:arm64 (1.0.0-2ubuntu2.3) over (1.0.0-2ubuntu2.2) ...
dpkg: error processing archive /var/cache/apt/archives/libegl1_1.0.0-2ubuntu2.3_arm64.deb (--unpack):
trying to overwrite '/usr/lib/aarch64-linux-gnu/libEGL.so.1.0.0', which is also in package rockchip-mali-midgard14 1.6-1
Preparing to unpack .../libgles2_1.0.0-2ubuntu2.3_arm64.deb ...
Unpacking libgles2:arm64 (1.0.0-2ubuntu2.3) over (1.0.0-2ubuntu2.2) ...
dpkg: error processing archive /var/cache/apt/archives/libgles2_1.0.0-2ubuntu2.3_arm64.deb (--unpack):
trying to overwrite '/usr/lib/aarch64-linux-gnu/libGLESv2.so.2.0.0', which is also in package rockchip-mali-midgard14 1.6-1
Errors were encountered while processing:
/var/cache/apt/archives/libegl1_1.0.0-2ubuntu2.3_arm64.deb
/var/cache/apt/archives/libgles2_1.0.0-2ubuntu2.3_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2019-08-01 16:48:31
只需在安装过程中覆盖文件:
$> dpkg -i --force-overwrite /var/cache/apt/archives/libegl1_1.0.0-2ubuntu2.3_arm64.deb
$> dpkg -i --force-overwrite /var/cache/apt/archives/libgles2_1.0.0-2ubuntu2.3_arm64.deb是的,有一个(IMHO小)风险,一些事情可能会不正常运作之后。
https://askubuntu.com/questions/1162723
复制相似问题