Skip to content
Advertisement

Can’t Fix Broken Git installation on Ubuntu

I was trying to install git on ubuntu, but there is an error when I try to install or fix broken git installation. This is the error:

JavaScript

I tried other possibles solutions, I will list here:

  • apt --fix-broken install. Error: The same problem as above.
  • apt purge git. Show me to make an apt fix broken install
  • sudo dpkg -i --force-overwrite /var/cache/apt/archives/git_1%3a2.17.1-1ubuntu0.8_amd64.deb. Error: dpkg-query: warning: files list file for package 'git' missing; assuming package has no files currently installed
  • I tried to remove all files inside dpkg/updates, apt/lists, apt/*.bin, and clen apt-get, to try to force the installation, but again the same error above.
JavaScript
  • I tryed to remove the git .deb file from /var/cache/apt/archives and install git again, but doesn’t work.

Advertisement

Answer

I resolved the problem with the commands below:

JavaScript

And then install git-core

JavaScript
Advertisement