"error while loading shared libraries" "No such file or directory"
I have for the first time installed a Ubuntu system. I downloaded the image off the Ubuntu site and installed it OK.
Everything seemed to work OK until I tried the "man" command. then I get Code:
mike@ubuntu:~$ man ping Code:
mike@ubuntu:~$ ls -al /usr/lib/man-db/libmandb-2.10.2.so Code:
mike@ubuntu:~$ echo $LD_LIBRARY_PATH Has anyone got any ideas what is going on ? Pretty much everything else seems to work. |
Is this a 32-bit or a 64-bit system?
What do file $(which man) and ldd $(which man) have to say about the man executable? |
Perhaps one run of ldconfig will fix it.
|
Tried running ldconfig and setting the cache, but it didn't help.
mike@ubuntu:~$ file $(which man) /usr/bin/man: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=9d1d6afa5c4cd04bcba60554a3ece9c7e9c4c03d, for GNU/Linux 3.7.0, stripped mike@ubuntu:~$ ldd $(which man) linux-vdso.so.1 (0x0000ffffa0eff000) libmandb-2.10.2.so => /usr/lib/man-db/libmandb-2.10.2.so (0x0000ffffa0d70000) libman-2.10.2.so => /usr/lib/man-db/libman-2.10.2.so (0x0000ffffa0d30000) libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffffa0d00000) libpipeline.so.1 => /lib/aarch64-linux-gnu/libpipeline.so.1 (0x0000ffffa0ce0000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffa0b30000) /lib/ld-linux-aarch64.so.1 (0x0000ffffa0ec6000) libgdbm.so.6 => /lib/aarch64-linux-gnu/libgdbm.so.6 (0x0000ffffa0b10000) libseccomp.so.2 => /lib/aarch64-linux-gnu/libseccomp.so.2 (0x0000ffffa0ae0000) mike@ubuntu:~$ ls -al /bin/man -rwxr-xr-x 1 root root 116144 Mar 17 2022 /bin/man |
and what about: file /usr/lib/man-db/libmandb-2.10.2.so
|
mike@ubuntu:~$ ls -al /usr/lib/man-db/libmandb-2.10.2.so
-rwxr-xr-x 1 root root 22448 Mar 17 2022 /usr/lib/man-db/libmandb-2.10.2.so mike@ubuntu:~$ Not sure if it needs to be marked executable or not. I suspect not. But ldd finds it so why is it saying it doesn't exist. It has to be something obvious, but I cant see it, and other the "man" cammand everything seems to be working OK. |
file, not ls.
|
mike@ubuntu:~$ file /usr/lib/man-db/libmandb-2.10.2.so
/usr/lib/man-db/libmandb-2.10.2.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f3c95f5ff40f6101b1c4840af73c7621edf01c76, stripped |
ok, it is quite strange. In such cases I would suggest you to run:
Code:
strace -o /tmp/strace.log man ping |
Oh, err. It's coming up permission denied. So it knows it is there. Now just got to work out why it's permission denied.
mike@ubuntu:~$ cat /tmp/strace.log | grep libmandb openat(AT_FDCWD, "/usr/lib/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/lib/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/usr/local/lib/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/lib/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/lib/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/lib/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/usr/lib/man-db/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/man-db/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/man-db/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/man-db/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/usr/lib/man-db/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/aarch64/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/usr/lib/libmandb-2.10.2.so", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) writev(2, [{iov_base="man", iov_len=3}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libmandb-2.10.2.so", iov_len=18}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="Permission denied", iov_len=17}, {iov_base="\n", iov_len=1}], 10) = 113 mike@ubuntu:~$ "sudo man ping" works. So it really is a permissions thing. So apart from Owner, Group, Other. What other permissions are there on Ubuntu ? Does it use ACL and selinux ? I tried getfacl and it's not installed, so I guess ACLs are not used on this Ubuntu system. |
probably you need to set execute permission on that lib
|
No. Makes no difference.
Code:
mike@ubuntu:~$ ls -al /usr/lib/man-db |
This may sound crazy, but does this system have man group?
|
No, something is not ok here:
Quote:
|
It does. I added my user to the man group. Logged out and back in. Made no difference.
|
All times are GMT -5. The time now is 08:11 AM. |