Install multiple package versions

I want to install several versions of the package (say libX) from src. The package (libX) uses Autotools to build, so the agreement must be followed. / configure, make, make install. Installed by default in / usr / local / bin and / usr / local / lib, and I want to install another version of this in / home / user / libX.

Another problem is that libX is a dependency for another package (say libY) that also uses autotools. How to force libY to indicate the version installed in / home / user / libX? It is also possible that its system package, for example ffmpeg, and I want to use the latest version of svn for my src code and therefore build it from src. What can I do in this case? What is the best practice in this case so that I don't crash system libraries?

I am using Ubuntu 10.04 and Opensuse 10.3.

+3
source share
1 answer

You can usually pass a parameter --prefixin order to configure it to install the library elsewhere. Therefore, for the personal version, you can run it as:

./configure --prefix=$HOME/usr/libX

$HOME/usr/libX/bin, $HOME/usr/libX/lib, $HOME/usr/libX/etc ..

libY , configure script pkg-config, , . libX .pc $HOME/usr/libX/lib/pkgconfig, configure, . pkg-config, .

PKG_CONFIG_PATH . libY

PKG_CONFIG_PATH=$HOME/usr/libX/lib/pkgconfig:/usr/local/lib/pkgconfig ./configure

man pkg-config .

+3

Source: https://habr.com/ru/post/1750742/


All Articles