Today, when I tried to use yaourt
to install some software, the following error happened:
......
package-query: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory
The root cause is the libalpm
in system is already libalpm.so.11
:
$ ls -lt /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 Jun 1 00:32 /usr/lib/libalpm.so -> libalpm.so.11.0.0
lrwxrwxrwx 1 root root 17 Jun 1 00:32 /usr/lib/libalpm.so.11 -> libalpm.so.11.0.0
-rwxr-xr-x 1 root root 223616 Jun 1 00:32 /usr/lib/libalpm.so.11.0.0
But the package-query
is still searching libalpm.so.10
:
$ ldd /usr/bin/package-query
linux-vdso.so.1 (0x00007fffb1d8d000)
libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007f4baee32000)
libyajl.so.2 => /usr/lib/libyajl.so.2 (0x00007f4baec28000)
libalpm.so.10 => not found
libc.so.6 => /usr/lib/libc.so.6 (0x00007f4bae86c000)
libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x00007f4bae647000)
......
The solution is removing yaourt
and package-query
, and re-intall them:
$ sudo pacman -Rn yaourt package-query
$ sudo pacman -S fakeroot
$ git clone https://aur.archlinux.org/package-query.git
$ cd package-query
$ makepkg -si
$ git clone https://aur.archlinux.org/yaourt.git
$ cd yaourt
$ makepkg -si
That’s it!