Skip to content

Instantly share code, notes, and snippets.

@Ham5ter
Last active June 13, 2016 14:03
Show Gist options
  • Save Ham5ter/0287710c02682cfcaf1847c28d5ca1be to your computer and use it in GitHub Desktop.
Save Ham5ter/0287710c02682cfcaf1847c28d5ca1be to your computer and use it in GitHub Desktop.
Compile and Install libgit2 for pygit2/salt-master 2015.5.3 (Lithium) on ubuntu 14.04
# This Script/gist helps you creating a libgit2 Debian Package from Source.
# Specify the libgit2 Version you want to build here!
LIBGIT2VERSION="0.24.1"
# Install dependencies (Ubuntu 14.04):
apt-get install wget cmake libssl-dev pkg-config libcurl4-openssl-dev libssh2-1-dev libhttp-parser-dev checkinstall
# create working directory
mkdir libgit2
cd libgit2
# Download and extract Sourcecode of Version $LIBGIT2VERSION
wget https://github.com/libgit2/libgit2/archive/v$LIBGIT2VERSION.tar.gz
tar xfz v$LIBGIT2VERSION.tar.gz
cd libgit2-$LIBGIT2VERSION
# compile libgit2
cmake .
make
# create a Debian Package, this allows us to cleanly remove libgit2 via package management
checkinstall --install=no
mv libgit2_$LIBGIT2VERSION-1_amd64.deb ../
cd ../
ls -lah
# Install and link the Library
dpkg -i libgit2_$LIBGIT2VERSION-1_amd64.deb
ldconfig
@Ham5ter
Copy link
Author

Ham5ter commented Jun 9, 2016

Keep in mind that the "checkinstall" is not automated, you need to interact with it. (line 23)

@Ham5ter
Copy link
Author

Ham5ter commented Jun 9, 2016

to Work with Saltstack (2015.5.3) on Ubuntu 14.04 you need to install pygit2 in version 0.23.1 and libgit2 in version 0.23.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment