LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


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

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
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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: 12

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
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,802

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
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



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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:09 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
Open Source Consulting | Domain Registration