Skip to content

Instantly share code, notes, and snippets.

@jamesrr39
Last active February 13, 2024 13:41
Show Gist options
  • Save jamesrr39/7c80d974059ec026d5b7 to your computer and use it in GitHub Desktop.
Save jamesrr39/7c80d974059ec026d5b7 to your computer and use it in GitHub Desktop.
Installing libgit2

Remove any libgit2 packages you already have, otherwise these will be included first and they do not necessarily have everything needed that you need for pygit2/git2go.

sudo apt-get purge libgit2-0 libgit2-dev

From http://www.pygit2.org/install.html

wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
tar xzf v0.23.4.tar.gz
cd libgit2-0.23.4/
cmake .
make
sudo make install

If you get:

error while loading shared libraries: libgit2.so.23: cannot open shared object file: No such file or directory

Add LD_LIBRARY_PATH envionment variable for dynamically linked libraries - stackoverflow link

export LD_LIBRARY_PATH=/usr/local/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment