LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2010, 10:48 PM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
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?
 
Old 02-11-2010, 10:55 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Code:
LD_LIBRARY_PATH=/new/path/to/add:$LD_LIBRARY_PATH
Evo2.
 
Old 02-12-2010, 03:35 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

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

.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how do I add a path to the LD_LIBRARY_PATH abatista Linux - Newbie 7 01-05-2014 04:03 PM
Add route entry ust Linux - Newbie 5 09-04-2008 09:43 PM
Unable to Add new Menu Entry crash_override_me Debian 3 05-19-2008 12:43 PM
How Do I Add An Entry To Drop Down Menu rrrssssss Linspire/Freespire 0 09-05-2007 05:07 AM
add entry to startup? TomalakBORG SUSE / openSUSE 1 11-22-2005 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration