apt-get error when installing git

5,302

Solution 1

I tried apt-get update but this gave me some more errors. I eventually had to do rm -r /var/lib/apt/lists/* to delete everything then run apt-get update to add everything back (and cleanup whatever might have been broken in there) and I was off and running.

Solution 2

Try running: "apt-get update"

and then try again.

If it still fails, paste the contents of your source.list here.

Share:
5,302

Related videos on Youtube

s g
Author by

s g

Code bot.

Updated on September 18, 2022

Comments

  • s g
    s g over 1 year

    I just set up a fresh Ubuntu 12.04.5 server amd64 machine on VirtualBox 4.2 (I was having install issues on OSX 10.10 using 4.3) and I'm able to do apt-get install curl but when I run apt-get install git I get the following error:

    The following packages have unmet dependencies:
     git : Depends: liberror-perl but it is not installable 
    E: Unable to correct problems, you have held broken packages.
    

    What's going on here? Is my sources.list file broke on a fresh install?

    NOTE: I thought this was specific, to git, but there were other packages that weren't working either

  • s g
    s g about 9 years
    I can't remember what the error was, but it essentially said it can't find some things. I had to keep digging deeper