After an update of my Manjaro system, my PHP server stopped working, with the error "php: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory".

It was probably caused by te fact that Readline was updated to version 8 and the old version deleted.

So is it possible to tell PHP 7.1 (php71-noconflict, 7.1.26) to use readline 8, or to somehow get both versions working?

  • I have successfully downgraded the library and started php server, but then bash started complaining. So I will need a way to either get php 7.1 working with readline8 or get both versions working along. – MrMid Jan 24 '19 at 17:44
  • Okay, seems like I broke my system completely now. As Bash is missing the readline8 library, I cannot do almost anything. I cannot install readline8 neither using package manager, nor using their own install script. What can I do now? Is there any solution? – MrMid Jan 24 '19 at 18:40
  • Why didn't you just make a symlink of libreadline.so.7 pointing to libreadline.so.8 or compile readline-7.0 from source and then put the library path in a file in /etc/ld.so.conf.d/ and then run ldconfig? – Nasir Riley Jan 24 '19 at 19:43
  • Okay, I did so, thank you. As I am not a very experienced user, it took me a lot of time, and at first I believed that PHP would not work with the new major version, so at first I tried to compile and use the old version, but that gave me errors all the time. The symlinked new version works. – MrMid Jan 25 '19 at 22:24
  • I'll post the symlink solution as an answer. – Nasir Riley Jan 25 '19 at 22:25

You can create a symlink in /usr/lib:

ln -s /usr/lib/libreadline.so.8 /usr/lib/libreadline.so.7 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.