LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-10-2014, 06:22 AM   #1
eshl
LQ Newbie
 
Registered: Dec 2013
Posts: 4

Rep: Reputation: Disabled
$ld_library_path


Hello,

Is there any way to set LD_LIBRARY_PATH environment for all users?

I am using
1) Suse Linux 11 Enterprise Server
2) DB2 10.5 Enterprise
3) JDBC drivers

I have setup my environment by using DB2 JDBC by export $CLASSPATH to the right JDBC drivers (db2jcc4.jar) and export LD_LIBRARY_PATH to /home/db2inst1/sqllib/lib. It work fine with the JDBC query which I am able to executed in the same terminal that will connect to DB2 database and return the query result. But when I switch to another users or closed the terminal, the $CLASSPATH and $LD_LIBRARY_PATH has changed. I need to export it again.

Thanks in advance.
 
Old 01-10-2014, 06:58 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,771

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
Hi,

You can use /etc/profile.local to define the env. variables you need.
For more details see this

Regards
 
1 members found this post helpful.
Old 01-13-2014, 10:25 PM   #3
eshl
LQ Newbie
 
Registered: Dec 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks Bathory. It work on my classpath after I exported it in /etc/profile.local but it didnt work on LD_LIBRARY_PATH.

#CLASSPATH and LD_LIBRARY_PATH
export CLASSPATH=/home/db2inst1/sqllib/java/db2jcc4.jar:${CLASSPATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/db2inst1/sqllib/lib64

I had cognos installed in the same environment, when I switch over to db2 default user db2inst1,I believe it has been overwrite on LD_LIBRARY_PATH. I still trying to figure out any config where they could have set in cognos or somehow link that to db2.

db2inst1@db2v105:/root/Desktop> $LD_LIBRARY_PATH
bash: /opt/ibm/cognos/c10_64/bin64:/opt/ibm/cognos/c10_64/cgi-bin: No such file

Thank you
 
Old 01-14-2014, 01:24 AM   #4
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 3,990

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
it is set, as far as I see. You need to check it by:
echo $LD_LIBRARY_PATH
Quote:
db2inst1@db2v105:/root/Desktop> $LD_LIBRARY_PATH
bash: /opt/ibm/cognos/c10_64/bin64:/opt/ibm/cognos/c10_64/cgi-bin: No such file
in this example LD_LIBRARY_PATH is set to /opt/ibm/cognos/c10_64/bin64:/opt/ibm/cognos/c10_64/cgi-bin and you tried to execute it (I mean you tried to execute this string as it was a command) and failed. It is the expected behaviour.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the LD_LIBRARY_PATH docetes Programming 2 02-20-2007 02:25 AM
Ld_library_path newbie_adm Linux - Newbie 2 08-30-2006 08:52 AM
???? Ld_library_path ???? g452 Linux - Software 9 08-26-2004 03:00 PM
Ld_library_path barrys Mandriva 2 06-15-2004 12:19 PM
Ld_library_path ? dahmad Linux - Newbie 5 02-21-2003 11:08 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration