LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add <install_dir>/lib to LD_LIBRARY_PATH if already entry is there? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-install_dir-lib-to-ld_library_path-if-already-entry-is-there-788598/)

your_shadow03 02-11-2010 10:48 PM

How to add <install_dir>/lib to LD_LIBRARY_PATH if already entry is there?
 
I already have LD_LIBRARY_PATH setup in my /etc/profile as:

Code:

export LD_LIBRARY_PATH=/usr/local/lib
Now there is a request to add a new entry for LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=$PATH:/opt/tptp/em64/lib

But If I add that to profile file,when I do:

cd $LD_LIBRARY_PATH

It will contradict.
Whats the solution?

evo2 02-11-2010 10:55 PM

Code:

LD_LIBRARY_PATH=/new/path/to/add:$LD_LIBRARY_PATH
Evo2.

knudfl 02-12-2010 03:35 AM

export LD_LIBRARY_PATH=/usr/local/lib .. : will add a path.


export LD_LIBRARY_PATH=$PATH:/opt/tptp/em64/lib

.. will exclude the other paths. Very handy in some
occasions, but usually only to be used temporarary,
unless all other paths are included in that line :

... :/opt/tptp/em64/lib:/lib:/usr/lib: , etc.

.....


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