library path in linux


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users library path in linux
# 1  
Old 12-23-2010
library path in linux

Is there something which is an alternative to the variable LD_LIBRARY_PATH?
The behaviour of this variable is that the path specified here will be checked before checking usual paths. But I want to have some folders checked for shared libraries after the usual paths. i.e usual paths have to precide over the ones I specify.
One way is to explicitly specify all the paths in this variable, but how can I find the paths that will be checked for shared libs when executing a binary in a linux machine? Is there some command or somefile in /proc to find that?
# 2  
Old 12-23-2010
man ldd
# 3  
Old 12-26-2010
I didnt understand from man ldd. It just lists the shared libraries of a particular executable. I want the whole path it searches for the shared library so that I can prepend that path with my path.
# 4  
Old 12-26-2010
see /etc/ld.so.conf

Note that it may be autogenerated in some configurations, like mine, where you need to follow your own system's conventions for modifying it. Even if it's not autogenned you should run /sbin/ldconfig after modifying it.

I found it by checking man ldd, which suggested see also ldconfig(8), and man ldconfig listed /etc/ld.so.conf in the intro paragraph.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX full path to socket library

Can somebody help me too identify full path to socket library on AIX? Cannot find anything Thanks for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies

2. Programming

Library/header path for ./configure

Hello, I am always confused about adding library path for ./configure when compiling software under Linux Debian based OS. For example the README of the software tells --with-boost=PATH specify directory for the boost header files --with-mpi=PATH specify prefix directory for... (4 Replies)
Discussion started by: yifangt
4 Replies

3. Programming

C++ library path

Hello, How to set up the path for downloaded C/C++ libraries (or, header files) so that they can be included like system headers (stdio.h or iostream)? The libraries/headers are from a package containing different folders each has different sets of headers and put in... (1 Reply)
Discussion started by: yifangt
1 Replies

4. Programming

Specifying dynamic library path to linker at compile time

I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great. But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies

5. HP-UX

How to use chatr to change static library path in binary?

I have solved this but now cannot recall the syntax. I want to strip or change the hard wired library paths on binaries I download from a repository. I do not have root and just want a personal install, but would rather not build every tool. I even posted the solution here once for others, but... (2 Replies)
Discussion started by: DGPickett
2 Replies

6. UNIX for Advanced & Expert Users

Can't find path for shared library: libintl.sl

Hello, Any inputs about this one? /usr/lib/dld.sl: Can't find path for shared library: libintl.sl /usr/lib/dld.sl: No such file or directory : Core file for 32-bit PA-RISC application : /tmp/usr/local/bin/git saved to /etc/core.git. ABORT instruction (core dumped) bash-4.0# echo... (3 Replies)
Discussion started by: SystemAddict
3 Replies

7. Shell Programming and Scripting

Library on Remote machine or $PATH is not working..

I don't know how to put this. However here is the problem. While executing command remotely on a Unix machine i get an error /usr/lib/hpux32/dld.so: Unable to find library 'libxerces-c.sl.21'. However when i execute the command on the remote machine locally. it works fine. Also i have... (2 Replies)
Discussion started by: suraj.sheikh
2 Replies

8. Shell Programming and Scripting

unix Library path variables.

Library path variables. I need to know the library rnvironment variable in linux. Ie, I install zlib directory in the custom path /usr/local/mylib and give --enable-zlib in the ffmpeg install, ffmpeg should check for the zlib libraries in the path /usr/local/mylib. Currently it checks /usr/lib... (5 Replies)
Discussion started by: anilcliff
5 Replies

9. HP-UX

removing library path

Hi Everyone I have written an installer dependant on several shared libraries. I am attempting to strip the full path from these dependant libraries using the chatr command via a script file but am having no success. Running ldd on the intaller exe fails with the following error. Cant open... (4 Replies)
Discussion started by: C3000
4 Replies

10. UNIX for Dummies Questions & Answers

library path

How do you get an application to use an alternate library? Dave:confused: (2 Replies)
Discussion started by: nucca
2 Replies
Login or Register to Ask a Question