I have a program that requires libreadline6. But I only have libreadline5 and libreadline7. I tried to install version 6 of the library but I cannot do this. A message comes up that the package is not available. The message goes on to say the library has been obsoleted or is only available from another source. I could try and use one of the other versions through a link but which one should I use? Any help would be appreciated. -Peter
1 Answer
Rather than download and install a point upgrade or downgrade of a specific library you can often simply make a symbolic link, commonly known as a symlink, from the required library to the point upgrade library.
In your case the most common location for the libreadline shared libraries will be /lib/x86_64-linux-gnu/libreadline.so.7.0
although this can be tested by running the following:
sudo find /lib -iname libreadline*
If this is the case the following two commands will successfully create a symlink to libreadline.so.7.0:
cd /lib/x86_64-linux-gnu
sudo ln -sv libreadline.so.7.0 libreadline.so.6
And then hopefully all will be well...
References:
- libreadline.so.6 required but libreadline.so.7 is the current version, build fails #993: A neat illustration of the required syntax from somebody caught in the same dilemma as yourself :)
-
You can create a symbolic link but that doesn't mean that works. A different library version MAY be compatible but more likely it will not, in worst case with catastrophic results– JohnOct 24, 2020 at 17:07
sudo find /lib -iname libreadline*
? My suspicion is that one result will be/lib/x86_64-linux-gnu/libreadline.so.7.0
in which case the following may be useful:cd /lib/x86_64-linux-gnu && sudo ln -sv libreadline.so.7.0 libreadline.so.6