Skip to main content
Topic: Broke my libreadline.so [SOLVED] (Read 1847 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Broke my libreadline.so [SOLVED]

I had a problem with R, that It couldn't reach libreadline.so.6.
So, I followed https://stackoverflow.com/questions/24962201/error-while-loading-shared-libraries-libreadline-so-5
and I screwed the libreadline command.


The state of my machine is such:

Code: [Select]
cd /usr/share 

Then,

Code: [Select]
ls | grep "libreadline"
                        
Code: [Select]
libreadline.so
libreadline.so.5
libreadline.so.8

Code: [Select]
readlink libreadline.so
Code: [Select]
libreadline.so.8

Code: [Select]
readlink libreadline.so.5
Code: [Select]
libreadline.so.8.1

Code: [Select]
readlink libreadline.so.8
Code: [Select]
libreadline.so.5

I can't update my system anymore.

Code: [Select]
pacman -Syu
I get these errors:
Code: [Select]
(9/9) checking package integrity                   [----------------------] 100%
error: GPGME error: Invalid crypto engine

Code: [Select]
error: libcap: missing required signature

Or, even,
Code: [Select]
yay -Sy readline6 readline7
Code: [Select]
 :: Importing keys with gpg...
gpg: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory
 -> problem importing keys


Is there a way to fix this?

Re: Broke my libreadline.so

Reply #1
So if you did this:
Code: [Select]
ln -sf libreadline.so.8 -T libreadline.so.5
you replaced libreadline.so.8 with a symlink to libreadline.so.5 ?
Well now you want it back again (mv'ing the original file first to libreadline.so.8.bak would be a sensible precaution if you want to try that again) so never mind, not a problem if the readline package is in your cache, otherwise get it from a mirror repo:
Code: [Select]
$ cd /var/cache/pacman/pkg
$ sudo pacman -U readline-8.1.001-1-x86_64.pkg.tar.zst
Or if that doesn't work pull the file from the package manually, copy the package to some empty dir then untar it:
Code: [Select]
$ tar -xvf readline-8.1.001-1-x86_64.pkg.tar.zst