Skip to content
Advertisement

How do I install a specific version of a git commit library in Linux?

How to install a specific version of git commit in Linux? When any program requests for the library it should take from the installation.

Eg: The following version of wiringPi is required by one of my c++ program.

git://git.drogon.net/wiringPi
Version: 5edd177112c99416f68ba3e8c6c4db6ed942e796

Advertisement

Answer

Add a checkout statement after you clone?

Eg:

git clone git://git.drogon.net/wiringPi
git checkout 5edd177112c99416f68ba3e8c6c4db6ed942e796

Then you type the build and installation commands – if you want everything to use it, it probably needs to go in the default location. For the package you’re looking at the documentation says it’s:

./build

If you already have a version from a package manager (like apt you should remove that first – the README.md from the package you linked explains how to do this)

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement