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.. has anyone seen a problem like this? Thanks. |
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
|
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 Code:
# libc default configuration 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. ------------------------- Steve Stites |
All times are GMT -5. The time now is 11:49 PM. |