I want to install multiple versions of a package (say libX) from src. The package (libX) uses Autotools to build, so follows the ./configure , make, make install convention. The one installed by default goes to /usr/local/bin and /usr/local/lib and I want to install another version of this in /home/user/libX .
The other problem is that libX is a dependency for another package (say libY) which also uses autotools. How to I make libY point to the version installed in /home/user/libX ? There could be also a possibility that its a system package like ffmpeg and I want to use the latest svn version for my src code and hence build it from src. What do i do in that case ? What is the best practice in this case so that I do not break the system libraries?
I’m using Ubuntu 10.04 and Opensuse 10.3.
You can usually pass the
--prefixoption to configure to tell it to install the library in a different place. So for a personal version, you can usually run it as:and it will install in
$HOME/usr/libX/bin,$HOME/usr/libX/lib,$HOME/usr/libX/etcand so on.If you are building libY from source, the configure script usually uses the
pkg-configtool to find out where a package is stored. libX should have included a .pc file in the directory$HOME/usr/libX/lib/pkgconfigwhich tells configure where to look for headers and library files. You will need to tell the pkg-config tool to look in your directory first.This is done by setting the PKG_CONFIG_PATH to include your directory first.
When configuring libY, try
man pkg-configshould give details.