LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 12-31-2008, 10:49 AM   #1
starkes
LQ Newbie
 
Registered: May 2006
Posts: 14

Rep: Reputation: 0
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.
 
Old 12-31-2008, 12:36 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
Old 12-31-2008, 02:09 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 12-31-2008, 02:16 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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:
  • the shell itself works fine
  • the rest of users have no problem
  • cd, which usually is a shell builtin, works ok
 
Old 12-31-2008, 04:25 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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.

-------------------------
Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run command as normal user at boot time julot Slackware 2 01-28-2007 10:27 AM
Script that will run a command, time it etc. kinetik Programming 7 06-20-2006 04:42 PM
how to run command in two ttys of same computer at the same time? pwangee Linux - Networking 2 07-16-2004 01:17 PM
how to run command in two ttys of same computer at the same time? pwangee Linux - General 1 07-15-2004 01:29 PM
Run Time Error- CLS command not found ashwinipahuja Programming 1 05-15-2004 12:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration