setenv: cannot add the LD_LIBRARY_PATH


 
Thread Tools Search this Thread
Operating Systems Solaris setenv: cannot add the LD_LIBRARY_PATH
# 1  
Old 01-23-2010
setenv: cannot add the LD_LIBRARY_PATH

Hi all!
I need to add new environment variable.
e.g. # setenv LD_LIBRARY_PATH "/usr/ucblib:"
#
I check:# env
LD_LIBRARY_PATH=/usr/ucblib:
After rebooting I don't see this variable.
Why don't save this variable?

Thanks.
# 2  
Old 01-23-2010
they aren't persistent across reboots. you can either force the environment to be set from your .profile (or whatever shell you use), or adjust crle to include this library. however, if you adjust crle, those libraries maybe used over others which may cause some issue. be mindful of the order in which these are listed.
# 3  
Old 01-23-2010
Quote:
Originally Posted by pupp
they aren't persistent across reboots. you can either force the environment to be set from your .profile (or whatever shell you use), or adjust crle to include this library. however, if you adjust crle, those libraries maybe used over others which may cause some issue. be mindful of the order in which these are listed.
But I tried in .login
# Main Paths set
setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH

don't work.Smilie
# 4  
Old 01-23-2010
Quote:
Originally Posted by wolfgang
But I tried in .login
# Main Paths set
setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH

don't work.Smilie
Try setting it in the profile file instead
# 5  
Old 01-23-2010
Hi.

Also. In CSH it will complain if the variable is not already set when appending to it.

Use
Code:
setenv LD_LIBRARY_PATH
...
...
setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH

---
I never fail to be amused at just how bad CSH is!
Code:
# Good...
% setenv Q
% setenv Q BLAH:$Q
% echo $Q
BLAH:

# Not good...
% setenv Q
% setenv Q $Q:BLAH
Bad : modifier in $ (B).

# Good...
% setenv Q ${Q}:BLAH
% echo $Q
BLAH:BLAH


Last edited by Scott; 01-23-2010 at 11:06 AM..
# 6  
Old 01-23-2010
It works. Smilie

Thanks

Last edited by wolfgang; 01-24-2010 at 02:24 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with LD_LIBRARY_PATH

I am on Solaris . I have written a script callled T_1.sh #!/bin/sh ######################################################################################################## # # Source borne shell env.This is required for crontab to work as bip.sh uses environmental variables.... (24 Replies)
Discussion started by: rafa_fed2
24 Replies

2. Shell Programming and Scripting

Ld_library_path

Hi., Currently my LD_LIBRARY_PATH setting is, LD_LIBRARY_PATH=/opt/app/product/11.2.0/client_1/lib Now, I need to append the JAVA to this setting... Can I set this way, Please suggest. ... (4 Replies)
Discussion started by: nuthakki
4 Replies

3. Shell Programming and Scripting

updating LD_LIBRARY_PATH

Inside my csh script, I have the following command: source ${HOME}/.login When I execute my csh script, why do I get the following error message: /cygdrive/c/WINDOWS/system32/export: Permission denied This is what I have inside my .login #!/bin/bash export... (9 Replies)
Discussion started by: casau
9 Replies

4. UNIX for Dummies Questions & Answers

Ld_library_path & path

I have googled around to find the difference between LD_LIBRARY_PATH & PATH. But the answers are creating more confusion. What is exact difference between these two paths? (1 Reply)
Discussion started by: tostay2003
1 Replies

5. UNIX for Advanced & Expert Users

setenv.

helllo every body .. hope you are having good time programming in unix . here is a little problem faced me : setenv("myvar","bla bla",1); system("myvar=$(grep....)); printf("%s\n", getenv("myvar")); will print : bla bla .. how can i get the value of grep into my program ? ... (7 Replies)
Discussion started by: max_475
7 Replies

6. HP-UX

SHLIB_PATH or LD_LIBRARY_PATH

hi Im using HP-UX 11i,PARISC .... Where do i find SHLIB_PATH or LD_LIBRARY_PATH , i couldnt find in env, listing...... Moreover im trying to execute file its throwing me error usr/lib/dld.sl: Can't find path for shared library: libgcc_s.sl /usr/lib/dld.sl: No such file or directory... (3 Replies)
Discussion started by: vasanthan
3 Replies

7. UNIX for Advanced & Expert Users

Difference between LIB_PATH and LD_LIBRARY_PATH

I would like to know the differences between LIB_PATH and LD_LIBRARY_PATH on Linux and SunOS. I am getting an error while loading shared libraries on Linux (Omni works build environment) as shown below: 1:tradewind/dataaccess/*.pcc... (0 Replies)
Discussion started by: shafi2all
0 Replies

8. UNIX for Dummies Questions & Answers

Ld_library_path

Hi, can anyone explain this terrm? should we setup it ? Thanks (1 Reply)
Discussion started by: ccp
1 Replies

9. UNIX for Dummies Questions & Answers

Bash LD_LIBRARY_PATH?

Hello I have just tried to install ns-allineone-2.31 on cygwin cygwin is using the bash shell it asks for somethings to be put into the LD_LIBRAY_PATH, here is a snippet of what it says. (1) You MUST put /home/Chris/ns-allinone-2.31/otcl-1.13, /home/Chris/ns-allinone-2.31/lib, into your... (1 Reply)
Discussion started by: bysonary
1 Replies

10. UNIX for Advanced & Expert Users

cc, setuid, and LD_LIBRARY_PATH

Hi, This question deals with Solaris 2.8 and setuid programs. From research I've done so far, setuid programs ignore LD_LIBRARY_PATH; I've proven this and am OK with it. The thing I am not certain of how the C compiler is supposed to behave when it is invoked via a setuid program. Basically,... (0 Replies)
Discussion started by: WolfBoy
0 Replies
Login or Register to Ask a Question