0

Recently I upgraded my laptop to Ubuntu 16.04.

This has apparently caused git to stop working.

Specifically, when I call any git command, I get the following error:

$ git st
git: error while loading shared libraries: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory

Ubuntu 16.04 appears to use libcrypto.so.10, not the earlier libcrypto.so.0.9.8. One might suspect that this implies that my version of git is out of date, but when I go to upgrade it, I'm told it's already the newest version:

$ sudo apt-get install git --upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

What is going on here, and what should I do?

  • What do which git and git --version say? Maybe there's an older binary elsewhere on your system? – steeldriver Oct 27 '16 at 0:06
  • @steeldriver can't run git --version for the reason mentioned. which git just returns ./git. – dbliss Oct 27 '16 at 0:09
  • 2
    So... is there an executable called git in your current directory? and . is in your $PATH? What does /usr/bin/git --version and/or /usr/bin/git status say? – steeldriver Oct 27 '16 at 0:14
  • @steeldriver sorry, i was calling which git from the directory where i'd just cloned the git repo. outside that directory, i get /usr/local/bin/git. – dbliss Nov 18 '16 at 19:38
  • @steeldriver it appears i have another copy of git at /usr/bin/git that does work. how should i remove the corrupted version at /usr/local/bin/git? – dbliss Nov 18 '16 at 19:40
0

What does which git say? That will tell you which copy of git is being run and if that is not the same one provided by the git package ( dpkg -L git ), then you have an older copy in the given location ( probably one you compiled yourself in /usr/local ) that is being used rather than the one from the git package. Get rid of the one you compiled yourself.

  • how would you recommend i get rid of the one i compiled myself? – dbliss Nov 18 '16 at 19:41
  • @dbliss, if you still have the source you built it from, then it may support make uninstall... otherwise you have to manually find the files and delete them. – psusi Jan 16 '17 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.