- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Setting env LD_LIBRARY_PATH
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 09:37 AM
тАО06-21-2006 09:37 AM
This is what i want it to look like.
LD_LIBRARY_PATH=/app/oracle/product/9.2.0/lib32:/egate/client/bin:/egate/server/
bin:/egate/client/JRE/1.3.1_02/lib/PA_RISC:/opt/java1.3/jre/lib/PA_RISC:/opt/for
esight/HVInstream:/opt/foresight/HVInstream/java:/opt/foresight/HVInstream/bin:/
app/oracle/product/9.2.0/lib
Can some help me out. PLEASE....
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 09:44 AM
тАО06-21-2006 09:44 AM
SolutionLD_LIBRARY_PATH=/xxx/yyy:/aaa/bbb/ccc
export LIBRARY_PATH
or
export LD_LIBRARY_PATH=/xxx/yyy:/aaa/bbb/ccc
so, your original line with the keyword 'export ' prepended will do the trick.
If the user is a csh user then you put the a similar entry in .cshrc and
setenv LD_LIBRARY PATH /xxx/yyy:/aaa/bbb/ccc
Often when LD_LIBRARY_PATH is needed SHLIB_PATH is also needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 09:47 AM
тАО06-21-2006 09:47 AM
Re: Setting env LD_LIBRARY_PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 09:51 AM
тАО06-21-2006 09:51 AM
Re: Setting env LD_LIBRARY_PATH
It cuts the end off
:/app/oracle/product/9.2.0/lib
Would I be able to add more path's once it's created and how would I go along doing this.
I very new in this env...
Thanks..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 09:57 AM
тАО06-21-2006 09:57 AM
Re: Setting env LD_LIBRARY_PATH
You can also do something like this:
LD_LIBRARY_PATH=/xxx/yyy/zzz:/aaa/bbc
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/mickey/mouse
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/donald/duck
export LD_LIBRARY_PATH
The idea is that you can keep adding on the the variable and then finally export it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 10:25 AM
тАО06-21-2006 10:25 AM
Re: Setting env LD_LIBRARY_PATH
1. I su as the user.
2. I set LD_LIBRARY_PATH
3. I export LD_LIBRARY_PATH
I logout and then log back in, it tells me
$ echo $LD_LIBRARY_PATH
su: LD_LIBRARY_PATH: Parameter not set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 10:32 AM
тАО06-21-2006 10:32 AM
Re: Setting env LD_LIBRARY_PATH
If you 'su' without the '-' as:
# su rafael
...then user 'rafael's profile is *not* sourced! You need to do:
# su - rafael
...to cause /home/rafael/.profile (for example) to be read (sourced).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 01:21 PM
тАО06-21-2006 01:21 PM
Re: Setting env LD_LIBRARY_PATH
su - rafael
And still getting the same results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 01:40 PM
тАО06-21-2006 01:40 PM
Re: Setting env LD_LIBRARY_PATH
1) Let's make certain that rafael's home directory (and shell) is what we think it is:
logins -o -x -l rafael #(Do this as root)
2) Now let's see if the file exists and owner/mode of the file:
ls -l /home/rafael/.profile
3) Finally, let's see what your .profile actually looks like:
cat /home/rafael/.profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2006 05:52 PM
тАО06-21-2006 05:52 PM
Re: Setting env LD_LIBRARY_PATH
Are putting the LD_LIBRARY_PATH in your .profile?
Do you have permission to access the specified directories?
Darrel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 01:58 AM
тАО06-22-2006 01:58 AM
Re: Setting env LD_LIBRARY_PATH
1)logins -o -x -l egate #(Do this as root)
miaux10: / =>login -o -x -l egate
Password:
Login incorrect
Wait for login retry: ..
login: egate
Password:
No utmp entry.You must exec "login" from the lowest level "sh".
Wait for login exit: ..
$
2)ls -l /home/egate/.profile
miaux10: / =>ls -l /home/egate/.profile
-r--r--r-- 1 egate egate 1794 Jun 21 15:15 /home/egate/.profile
3) cat /home/egate/.profile
miaux10: / =>cat /home/egate/.profile
# @(#)B11.23_LR
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
export PATH=/egate/client/bin:\
/egate/client/JRE/1.3.1_02/bin:\
/egate/client/odbc40/bin:\
/egate/client/odbc40/lib:\
/egate/server/bin:\
/opt/bin:\
/opt/imake/bin:\
/opt/java1.3/bin:\
/opt/java1.3/lib:\
/opt/langtools/bin:\
/opt/perl/lib/5.6.1:\
/opt/perl/bin:\
/opt/sec_mgmt/spc/bin:\
/usr/bin:\
/usr/lib:\
/usr/local/bin:\
$ORACLE_HOME/bin:\
/opt/foresight/HVInstream:\
/opt/foresight/HVInstream/java:\
/opt/foresight/HVInstream/bin:\
$PATH
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
. oracle_setup
export LD_LIBRARY_PATH=/app/oracle/product/9.2.0/lib32:\
/egate/client/bin:\
/egate/server/bin:\
/egate/client/JRE/1.3.1_02/lib/PA_RISC:\
/opt/java1.3/jre/lib/PA_RISC:\
/opt/foresight/HVInstream:\
/opt/foresight/HVInstream/java:\
/opt/foresight/HVInstream/bin:\
$LD_LIBRARY_PATH
LIBPATH=/egate/server/bin
export SHLIB_PATH=/app/oracle/product/9.2.0/lib32:\
/egate/client/bin:\
/egate/client/JRE/1.3.1_02/lib/PA_RISC:\
/egate/client/JRE/1.3.1_02/lib/PA_RISC/classic:\
/egate/client/odbc40/lib:\
/egate/server/registry/repository/default/JRE/1.3.1_02/lib/PA_RISC/classic:\
/opt/java1.3/jre/lib/PA_RISC:\
/opt/foresight/HVInstream:\
/opt/foresight/HVInstream/java:\
/opt/foresight/HVInstream/bin:\
$SHLIB_PATH
export ODBCINI=/home/egate/.odbc.ini
export ORACLE_SID=xchgtst
export PGPPASS=jumbojet
export PGPPATH=/home/egate
export TEMP=/egate/SMIME_TEMP
export FSINSTREAMINI=/opt/foresight/HVInStream/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 02:17 AM
тАО06-22-2006 02:17 AM
Re: Setting env LD_LIBRARY_PATH
logins -o -x -l egate
Carefully check each of your continued lines that "\" is the very last character of such a line. Specificically, "\
The other thing to check is the sourced file oracle_setup. Make sure that there are no exit or return statements in it; if any of these are found the current process exits at that point and anything in .profile after that is never executed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 02:20 AM
тАО06-22-2006 02:20 AM
Re: Setting env LD_LIBRARY_PATH
miaux10: / =>logins -o -x -l egate
egate:110:egate:110:,,,:/home/egate:/usr/bin/sh:PS:061906:0:90:14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 02:24 AM
тАО06-22-2006 02:24 AM
Re: Setting env LD_LIBRARY_PATH
OK, the problem is that you are trying to setup LD_LIBRARY_PATH to contain a series of pathes prepended to whatever the variable's current value represents. However, if the current value is null (undefined) you get the error " LD_LIBRARY_PATH: Parameter not set".
You could place this statement ahead of your 'export' declaration.
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=" "}
...This should achieve your purpose.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 02:36 AM
тАО06-22-2006 02:36 AM
Re: Setting env LD_LIBRARY_PATH
I perform this the same way HP-UX handles PATH and MANPATH:
- create a file /etc/LD_LIBRARY_PATH containing the requested values
- in ~/.profile or similar use:
if [ -s /etc/LD_LIBRARY_PATH ]
then
LD_LIBRARY_PATH=`cat /etc/LD_LIBRARY_PATH`
export LD_LIBRARY_PATH
fi
- I would ignore a preset envvar LD_LIBRARY_PATH from the admin point of view and handle all via this file.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 02:40 AM
тАО06-22-2006 02:40 AM
Re: Setting env LD_LIBRARY_PATH
You could do a "set +u" so that undefined variables do not cause an error but that is really considered sloppy so the better approach is test a variable before doing an assignment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 03:59 AM
тАО06-22-2006 03:59 AM
Re: Setting env LD_LIBRARY_PATH
you have to check if the user already has an env variable.
This example is for csh and SHLIB_PATH:
if ($?SHLIB_PATH) then
setenv SHLIB_PATH ${SHLIB_PATH}:/opt/java1.4/jre/lib/PA_RISC/server:/opt/java1.4/jre/lib/PA_RISC
else
setenv SHLIB_PATH /opt/java1.4/jre/lib/PA_RISC/server:/opt/java1.4/jre/lib/PA_RISC
endif
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 04:02 AM
тАО06-22-2006 04:02 AM
Re: Setting env LD_LIBRARY_PATH
I have it all defined in the .profile...
# @(#)B11.23_LR
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:/usr/local/bin:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
#. oenv xchgprd
export LD_LIBRARY_PATH=/egate/client/bin:/egate/server/bin:/egate/client/JRE/1.3.1_02/lib/PA_RISC:/opt/java1.3/jre/lib/PA_RISC:/opt
/foresight/HVInstream:/opt/foresight/HVInstream/java:/opt/foresight/HVInstream/bin:$LD_LIBRARY_PATH
export LIBPATH=/egate/server/bin
export SHLIB_PATH=/egate/client/bin:\
/egate/client/JRE/1.3.1_02/lib/PA_RISC:\
/egate/client/JRE/1.3.1_02/lib/PA_RISC/classic:\
/egate/client/odbc40/lib:\
/egate/server/registry/repository/default/JRE/1.3.1_02/lib/PA_RISC/classic:\
/opt/java1.3/jre/lib/PA_RISC:\
/opt/foresight/HVInstream:\
/opt/foresight/HVInstream/java:\
/opt/foresight/HVInstream/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 04:11 AM
тАО06-22-2006 04:11 AM
Re: Setting env LD_LIBRARY_PATH
in what way do you login to the host?
- CDE
Check
fgrep PROFILE ~/.dtprofile
for a line like
DTSOURCEPROFILE=true
- telnet
- ssh
What is the result of
set | fgrep LIB
after login?
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 04:20 AM
тАО06-22-2006 04:20 AM
Re: Setting env LD_LIBRARY_PATH
$ set |fgrep LIB
$
Comes back to a prompt...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 04:25 AM
тАО06-22-2006 04:25 AM
Re: Setting env LD_LIBRARY_PATH
please send the following output:
1) echo $0 $SHELL
2) fgrep LD_LIBRARY_PATH ~/.profile
3) set -x
. ./.profile
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2006 04:36 AM
тАО06-22-2006 04:36 AM
Re: Setting env LD_LIBRARY_PATH
It was a syntax error.
Thanks all for your support.. Learned a little more about env.
Thanks.