3

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

3
  • You may be able to get away with a simple symlink. What is the result of: 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
    – andrew.46
    Commented Nov 19, 2019 at 20:42
  • Thanks I created a link to version 7 and it seems to work.
    – PLS
    Commented Nov 20, 2019 at 23:08
  • Great news! I have converted the 'comment' into a formal answer and hopefully you will have the time to 'Accept' the answer as a successful one by clicking on the 'check' mark next to the answer...
    – andrew.46
    Commented Nov 20, 2019 at 23:18

1 Answer 1

1

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:

1
  • 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
    – John
    Commented Oct 24, 2020 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .