"error while loading shared libraries" "No such file or directory"
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144
Original Poster
Rep:
Quote:
Originally Posted by pan64
No, something is not ok here:
These are located in /lib and /usr/lib. And probably they really not accessible, but available. You need to check the permission on those files, not inside /usr/lib/man-db.
Those files really do not exist, so I don't know why it's reporting them as access denied. I even used a 'sudo ls' still not there.
Code:
mike@ubuntu:~$ ls /usr/lib/libmandb-2.10.2.so
ls: cannot access '/usr/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ ls /lib/libmandb-2.10.2.so
ls: cannot access '/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ sudo ls /lib/libmandb-2.10.2.so
ls: cannot access '/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ sudo ls /usr/lib/libmandb-2.10.2.so
ls: cannot access '/usr/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$
Note that permission will be denied if any node in the path to the file in question denies permission
In other words, what are the permissions seen on /usr, /usr/lib, and /usr/lib/man-db. All should show something like
Code:
$ ls -ld /usr /usr/lib /usr/lib/man-db
drwxr-xr-x. 16 root root 4096 Aug 13 02:20 /usr
dr-xr-xr-x. 112 root root 65536 Oct 5 02:20 /usr/lib
drwxr-xr-x. 2 root root 24576 Aug 31 10:14 /usr/lib/man-db
to allow any and all users to read and execute commands (including using the libraries) within those directories.
Permissions are not just related to the particular file but also to the path needed to access the file. For most users the permissions in the 'other' block are the ones of interest with system files.
Last edited by computersavvy; 10-06-2022 at 05:40 PM.
Those files really do not exist, so I don't know why it's reporting them as access denied. I even used a 'sudo ls' still not there.
Code:
mike@ubuntu:~$ ls /usr/lib/libmandb-2.10.2.so
ls: cannot access '/usr/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ ls /lib/libmandb-2.10.2.so
ls: cannot access '/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ sudo ls /lib/libmandb-2.10.2.so
ls: cannot access '/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$ sudo ls /usr/lib/libmandb-2.10.2.so
ls: cannot access '/usr/lib/libmandb-2.10.2.so': No such file or directory
mike@ubuntu:~$
Since the file does not exist it follows that certain apps may report "access denied" instead. After all it is certainly difficult to grant access to some file that is not present.
Thus, it relies on what the app reports as to how it is seen and interpreted by the user. Ls is telling you the file is not present. The other app says 'access denied'. Two different ways of saying the same thing.
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144
Original Poster
Rep:
Quote:
Originally Posted by computersavvy
Note that permission will be denied if any node in the path to the file in question denies permission
In other words, what are the permissions seen on /usr, /usr/lib, and /usr/lib/man-db. All should show something like
Code:
$ ls -ld /usr /usr/lib /usr/lib/man-db
drwxr-xr-x. 16 root root 4096 Aug 13 02:20 /usr
dr-xr-xr-x. 112 root root 65536 Oct 5 02:20 /usr/lib
drwxr-xr-x. 2 root root 24576 Aug 31 10:14 /usr/lib/man-db
to allow any and all users to read and execute commands (including using the libraries) within those directories.
Permissions are not just related to the particular file but also to the path needed to access the file. For most users the permissions in the 'other' block are the ones of interest with system files.
Yeah, thanks we knew that. As you can see the permissions are OK.
Code:
mike@ubuntu:~$ ls -ld /usr /usr/lib /usr/lib/man-db
drwxr-xr-x 11 root root 4096 Aug 9 11:54 /usr
drwxr-xr-x 83 root root 4096 Oct 6 11:13 /usr/lib
drwxr-xr-x 2 root root 4096 Oct 6 13:01 /usr/lib/man-db
mike@ubuntu:~$
We had a meeting here about this system. It's the first time we have used Ubuntu, and we're not happy about this weird behaviour. We have only ever used systems built completely from source, or used Fedora.
The version we downloaded from this URL https://ubuntu.com/download/raspberry-pi was the 64-bit server. We are running it on a Raspberry Pi 4 (8Gb). Of course being a Raspberry Pi we cannot use the normal .iso because it has to boot from something before it can read an .iso image, so we used this preconfigured .img on the SDHC
Incidentally we did try an apt reinstall of man, but all that did was remove the execute permissions on the library.
We have the work-around of using the sudo command, but the consensus of the meeting is that we'll no longer continue with this, because we don't like the idea of not knowing why, and then there's lots of other stuff we're not used to like cloud-init etc.
I'll leave the thread without flagging it solved, but will check back from time to time to see if anyone has a fix.
This certainly looks like a bug, you should file it with Ubuntu bug tracker.
Yes, it looks like a bug, but I'm pretty sure it cannot be easily reproduced. So if you want to report it you need to find a way to reproduce it.
From the other hand yes, it looks like a bug, but I'm not really sure it is really a bug and not a misconfiguration. Actually I cannot check it on that host, so I can only give some ideas to test and to try. Anyway, I would still try to put that lib into /usr/lib, probably that will work. Or probably you only need to specify LD_LIBRARY_PATH (and probably that was incorrect in the past).
Finally it would be a really ugly and annoying bug, I don't really think it could hide for a long time (if it was really a bug somewhere).
This is ARM version of Ubuntu, not many may be worried about this bug. Generally, how popular is Ubuntu for ARM? Furthermore, if there are Ubuntu ARM desktop users, how many of them would even try to read man pages?
This is ARM version of Ubuntu, not many may be worried about this bug. Generally, how popular is Ubuntu for ARM? Furthermore, if there are Ubuntu ARM desktop users, how many of them would even try to read man pages?
RPi is an arm device. And this is not the only one. Anyway, for root it works, so most probably it is a setting/configuration related issue, not a bug. But I'm not really sure about that.
I have an RPi 4B (8 GB) running Ubuntu 22.04 LTS.
Checking it out in relation to the problems noted here by the OP I find that everything he had problems with just worked for me.
man ping works with no errors. In fact man works with every task I tried.
I have the same files in /usr/lib/man-db as the OP.
I do note however that there are no libmandb.so-2.10.2 files in /usr/lib, but only in /usr/lib/man-db.
My user does not display a value for "echo $LD_LIBRARY_PATH"
I wonder if the errors reported earlier about the files /lib/libmandb.so-2.10.2 and /usr/lib/libmandb.so-2.10.2 were related to the fact that the OP had $LD_LIBRARY_PATH defined and it was not needed. That value may have interfered with finding the actual file. It certainly is not required for me and AFAIK has never been needed for the average user.
$ uname -a
Linux raspi 5.15.0-1015-raspi #17-Ubuntu SMP PREEMPT Mon Sep 12 13:14:51 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
I have an RPi 4B (8 GB) running Ubuntu 22.04 LTS.
Checking it out in relation to the problems noted here by the OP I find that everything he had problems with just worked for me.
man ping works with no errors. In fact man works with every task I tried.
I have the same files in /usr/lib/man-db as the OP.
I do note however that there are no libmandb.so-2.10.2 files in /usr/lib, but only in /usr/lib/man-db.
My user does not display a value for "echo $LD_LIBRARY_PATH"
I wonder if the errors reported earlier about the files /lib/libmandb.so-2.10.2 and /usr/lib/libmandb.so-2.10.2 were related to the fact that the OP had $LD_LIBRARY_PATH defined and it was not needed. That value may have interfered with finding the actual file. It certainly is not required for me and AFAIK has never been needed for the average user.
$ uname -a
Linux raspi 5.15.0-1015-raspi #17-Ubuntu SMP PREEMPT Mon Sep 12 13:14:51 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
I can't check at this moment, but if that so file is found in /lib or /usr/lib the system will try to use it and will drop an error if actually useless. Probably that is the problem, there is something in those directories (based on the strace log).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.