missing libraries every time i run a command (except cd)
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.
missing libraries every time i run a command (except cd)
Hi,
I have a centos 5 installation up and running, and everything seems good except...
One user account is having a major problem. If you try to run any command or program, it says there's a missing library.
The particular library missing is different for each program you try to use, but it seems almost like when under this user none of the library folders are getting sourced... or something..
No, but check your shell initialization files, in case that any of them is overriding LD_LIBRARY_PATH or something like that. For example, if you use bash you should check ~/.bashrc, ~/.bash_profile, ~/.bash_login and ~/.profile. For other shells read their man page to know where to look.
If this happens only for one user that's the only advice I can give you.
Have the user do an echo $PATH and see if it shows what you expect it to show. (If the user is unable to open a terminal window, you can have the user try a Ctrl-Alt-F3 and log in to tty3 to do the echo.) Following i92guboj's advice would be good, but, obviously, check for PATH= statements. I suspect that the user may have some script, perhaps not even one of the standard .bash* ones, that exports a PATH but neglects to concatenate $PATH to the value being exported.
You might also want to look for something "special" in /etc/rc.d/rc.local for the problem user.
PTrenholme, in that case it wouldn't be able to find the executable programs, and the error would be something in the lines of "command not found". However it seems that the problem is that it can't find libraries. The bin directories rarely contain a library. On a similar way, the lib directories never appear in PATH. So, this command will return nothing in any system if you try it.
Code:
# echo $PATH|grep lib
In other order of things, I believe it's something to do with the shell initialization files because:
i92guboj is on the right track. Linux keeps the names of the libraries in a file called /etc/ld.so.conf which applies to all users. In CentOS /etc/ld.so.conf references a directory called /etc/ld.so.conf.d where it keeps the actual list. This list is used for all users and root. In my CentOS /etc/ld.so.conf.d contains two files:
/etc/ld.so.conf.d/i486-linux-gnu.conf which contains:
Code:
# Multiarch support
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu
/etc/ld.so.conf.d/libc.conf which contains:
Code:
# libc default configuration
/usr/local/lib
Since most of your users have no problem finding the standard libraries there is probably nothing wrong with the library configuration files in your /etc. But you should check them first to make sure they are correct.
If they are correct then the question is why is the one user account unable to access the standard libraries. A user can modify the library list. They do so by setting the LD_LIBRARY_PATH variable. Have the user who is having problems issue this command to check his LD_LIBRARY_PATH variable:
echo $LD_LIBRARY_PATH
If the LD_LIBRARY_PATH variable hasn't been touched then you should get a null response. If the LD_LIBRARY_PATH contains some data then the problem is an incorrectly set LD_LIBRARY_PATH.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.