Are there circumstances where because of conflicting dependencies, say different versions of a library, that two pieces of software might be impossible to have installed together?
How is this circumstance managed in the Linux user community?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityAre there circumstances where because of conflicting dependencies, say different versions of a library, that two pieces of software might be impossible to have installed together?
How is this circumstance managed in the Linux user community?
Install library into another directory (e.g. /usr/local/lib
), then set LD_LIBRARY_PATH
environment.
LD_LIBRARY_PATH=/usr/local/lib command
yum
to install libraries, is it possible to specify a nonstandard location?
Oct 17, 2018 at 19:52
Yes, it is a frequent position of a sysadmin, to have two software packages that can’t share a single machine nicely.
Like you theorize, varrying library versions can be a cause. Two software packages that implement the same functionality will often conflict, when installed with default settings. The reasons why one want both packages on the same machine vary, as do the appropriate solutions.
For some situations, simply having a script that sets the appropriate LD_LIBRARY_PATH, et al., will suffice. For some situations, the safest method is a guest VM.
Ruby engineers so often need multiple versions installed on the same machine, they came up with rvm, a tool that helps manage the installation, maintenance and usage of side-by-side installations.
In addition to the approach that Ipor Sircer describes, there are a number of other approaches:
virtual environments like python's virtualenv and ruby's bundler.
Containers and chroot jails.