4

I am trying to install Git in Ubuntu 18.04 but it fails with errors. Here is the command that I am using:

sudo apt install git

Here is the error that is shown:

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).

I have tried the following commands but it doesn't help.

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

Here is the log for 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)
Zanna
  • 70,465
Dronzer
  • 143

1 Answers1

3

Just overwrite the files during installation:

$> 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

Yes, there is a (IMHO small) risk that something might not work properly afterwards.

thedler
  • 314