1752758 Members
4956 Online
108789 Solutions
New Discussion юеВ

Re: env statements

 
SOLVED
Go to solution
Brett Penza
Occasional Advisor

env statements

I am changing an env statement in HP 9000 Unix box.
SHLIB_PATH=/opt/vertex20/lib

When I do this, my program still does not see files in this directory.

I'm wondering if I need to REBOOT THE system for changes to ENV to take place. Or if there is some procedure I must run to get ENV variables to become active. Thanks. for help
-bdp
11 REPLIES 11
Ian Dennison_1
Honored Contributor

Re: env statements

Which location are you changing the path in? The /etc/profile, or ~/.profile?

Is the variable actually set? Go into a shel and enter "env", look for the variable to confirm.

Share and Enjoy! Ian
Building a dumber user
PIYUSH D. PATEL
Honored Contributor
Solution

Re: env statements

Hi,

SHLIB_PATH=/opt/vertex20/lib
export SHLIB_PATH

This should work. I think that you forgot to export it.

HTH,
Piyush
Massimo Bianchi
Honored Contributor

Re: env statements

Hi,
you have to check if the searching is enabled.

use

chatr
to see and

chatr +s
to enable searching


after that,
you have to simply re-load the env.

as your user in your homo

. ./.profile


or just logout/login


HTH,
Massimo
James R. Ferguson
Acclaimed Contributor

Re: env statements

Hi:

You need to export the modified variable. You can do this in one line as:

# export SHLIB_PATH=/opt/vertex20/lib

Regards!

...JRF...
Ian Dennison_1
Honored Contributor

Re: env statements

Yes, you should export the variable. Also, if this is a regular requirement,...

a) Place it in a profile script
b) Ensure that you include any existing contents of the SHLIB_PATH variable (Oracle uses this variable as well!) if it already has existing contents.

ie export SHLIB_PATH=$SHLIB_PATH:/opt/vertex20/lib

NB. No users were harmed during the coding of this script (more's the pity). Ian
Building a dumber user
Brett Penza
Occasional Advisor

Re: env statements

I'm just retyping a different path at the root prompt.
ie,.
root:\SHLIB_PATH=/opt/vertex132/lib

Then when I type "env" It does show the change that I have made.

I'm just not sure if this change is in place for everyone, or is there some wierd thing going on here. Because the program can't find the files that are in that directory when
it runs.

Thanks for response.
-bdp
Ian Dennison_1
Honored Contributor

Re: env statements

Question - does the program start as another User, or is it started using a script that may wipe out environment variables that were set?

Share and Enjoy! Ian
Building a dumber user
Hai Nguyen_1
Honored Contributor

Re: env statements


The following command may be better...:

# export SHLIB_PATH=/opt/vertex20/lib:$SHLIB_PATH

in case there is already some value in SHLIB_PATH and your program needs to have access to more than one library paths.

Hai
Caesar_3
Esteemed Contributor

Re: env statements

Hello!

If you made this in the workspace that you after try to run that's ok (for feature better to put in you enviroment files)
Check with the chatr that it find
the library.

Caesar