LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-30-2006, 06:59 AM   #1
newbie_adm
Member
 
Registered: Jun 2006
Posts: 40

Rep: Reputation: 15
Ld_library_path


Hi, I would like to know where I can modify or add the mysql client shared library on the LIB_LIBRARY_PATH?What file am I going to modify? When I logon as root where Can i confgure it? Please help me on this one. I really new to linux suse 9. Mysql version is 5.1 i think.

Best regards,
newbie_adm
 
Old 08-30-2006, 08:50 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
In the file ~/.bash_profile.
 
Old 08-30-2006, 08:52 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,528

Rep: Reputation: 1054Reputation: 1054Reputation: 1054Reputation: 1054Reputation: 1054Reputation: 1054Reputation: 1054Reputation: 1054
You can, in /etc/profile, add a line like this:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

where "/usr/local/lib" is the directory (NOT the name of the library) where the library(ies) reside that you want on your path. Note that /usr/local/lib is already (in most cases) included in the default library search path, so you don't need to add that, this is just an example. On the other hand, if the library file you need (the extension is ".a" or ".so") is in /usr/local/lib, well, add that to LD_LIBRARY_PATH (because your system doesn't default that way). Don't overdo this, just add what you need and nothing else.

You do this in /etc/profile so any user logged in on the system will have this environment variable defined (and you only have to do it once in one place and you've done your day's work). You must log off and log back on for the change to take effect -- /etc/profile is read once by all shell programs at login -- and you must be root or use the su utility to edit that file. Do the entry somewhere after the setting(s) that may be there for PATH (look at the comments in the file to figure out where to add it, and, if there is already an entry for LD_LIBRARY_PATH, add the new one as above below the last entry.

After you've done editing, logged off and back on, check what you did with

echo ${LD_LIBRARY_PATH}

and see that what you did actually is what you wanted (obviously, if it's not, correct it).

The form is important: be sure to use the ${LD_LIBRARY_PATH} form, and separate any additional directory entries with a colon (as shown). The "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib" form says, "assign whatever value that may already exist, then append the new value to it." You can append one or more values on one line or you can do this on multiple lines (if you need to add more paths that just this one); the format says to append, not replace, and multiple lines are just fine.

Hope this helps.
 
  


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
Ld_library_path fng_#1 Linux - Software 4 09-19-2004 11:33 PM
Ld_library_path barrys Mandriva 2 06-15-2004 12:19 PM
Ld_library_path Dogface1SG Linux - Software 1 11-16-2003 01:28 AM
where is LD_LIBRARY_PATH Ninja_212 Slackware 4 10-07-2003 10:41 PM
Ld_library_path ? dahmad Linux - Newbie 5 02-21-2003 11:08 PM


All times are GMT -5. The time now is 12:05 AM.

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