- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: trouble setting default SHLIB_PATH environment...
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
Forums
Discussions
Discussions
Discussions
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
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
03-23-2001 06:41 AM
03-23-2001 06:41 AM
and it requires an entry in the SHLIB_PATH
environmental variable. No problem, i figure, so, i went to /etc/SHLIB_PATH and added their library to
what was already there. The same sort of thing
works find for /etc/PATH all the time....
HOWEVER, when i logon and echo $SHLIB_PATH, it says "sh: SHLIB: Parameter not set."
Is there something else i have to do to make the
system "see" the default SHLIB_PATH in /etc like
it does the default PATH in /etc?
Thanks for any pointers... Lynne Seamans,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 06:54 AM
03-23-2001 06:54 AM
Re: trouble setting default SHLIB_PATH environmental
should be something like
export $PATH=$PATH:/extra_path
echo $PATH to verify
or any other variable
echo $VARIABLE
export VARIABLE=value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 06:57 AM
03-23-2001 06:57 AM
Re: trouble setting default SHLIB_PATH environmental
think you have to put a line ie:
SHLIB_PATH=/...... ; export SHLIB_PATH
into your /etc/profile
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 07:23 AM
03-23-2001 07:23 AM
Re: trouble setting default SHLIB_PATH environmental
Think you made a typo in your query. When you echo $SHLIB_PATH, if it has not been set, it should say "sh: SHLIB_PATH: Parameter not set." instead of "sh: SHLIB: Parameter not set." as indicated.
As already mentioned by the rest, assigning and exporting it in the global /etc/profile is the cleanest.
If you only want to tailor SHLIB_PATH specifically to a login account, then you have to add it into ~/.profile of that login user for sh, bash, ksh shells. For csh and tcsh shells, you have to add eg. "setenv SHLIB_PATH /a/b/c:/d/e/f" into either ~/.cshrc or ~/.login.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 07:27 AM
03-23-2001 07:27 AM
Re: trouble setting default SHLIB_PATH environmental
Here is my exact /etc/SHLIB_PATH
/usr/lib:/opt/cobol/cobdir/coblib:/etc/opt/resmon/lib:/usr/local/syncsort/lib
If i don't put anything in my profile, shouldn't I get those values?
BUt anyways, I did put in my profile :
SHLIB_PATH=$SHLIB_PATH:/usr/local/syncsort/lib
export SHLIB_PATH
which i realize would give me syncsort twice, but
i'm just testing.
when i logged back on i got:
.profile[32]: SHLIB_PATH: Parameter not set.
which made me think the $SHLIB_PATH didn't
have any value to add anything to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 07:36 AM
03-23-2001 07:36 AM
Re: trouble setting default SHLIB_PATH environmental
I think you all spotted it on the export..
In any case, in your .profile on line 32 are you trying to reference the SHLIB_PATH env variable before it is exported. Your export cammand looks just fine.
echo $SHLIB_PATH even though there is an error in your case should work if that were the case.
You might want to add a set -x near the top of your .profile to debug the .profile.
To source your profile on the fly try
. ~/.profile
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 07:49 AM
03-23-2001 07:49 AM
Re: trouble setting default SHLIB_PATH environmental
For PATH, if I want to add to the stuff i get for "free"
in /etc/PATH, i put close to the top of my .profile
PATH=$PATH:newstuff:morenewstuff
and it works, no exporting, whatever.
That's what i'm trying to do for SHLIB_PATH.
So, that's what I just tried. my profile is:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
".profile" 71 lines, 1536 characters
# @(#) $Revision: 74.2 $
# Default (example of) super-user's .profile file
# Do not put "." in PATH; it is a potential security breach.
# Do not put "/usr/local/bin" in PATH; it is a potential security breach.
# Example assumes /home/root exists.
set +u
PATH=/usr/sbin:$PATH:/sbin:/home/root/bin:/opt/sudo/bin:/opt/sudo/etc:/opt/omni/sbin:/usr/local/sbin
MANPATH=$MANPATH:/opt/sudo/man
SHLIB_PATH=$SHLIB_PATH:/usr/local/syncsort/lib=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PATH and MANPATH are right. when i say
echo $SHLIB_PATH it says:
:/usr/local/syncsort/lib
which implies the $SHLIB_PATH was null, and i only
got the appended stuff.
Where's the values from /etc/SHLIB_PATH????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2001 08:05 AM
03-23-2001 08:05 AM
SolutionI believe you will have to deal with /etc/SHLIB_PATH differently from /etc/PATH. Notice that when you perform a grep of '/etc/PATH', it is referenced in /etc/csh.login and /etc/profile. However, /etc/SHLIB_PATH is not referenced anywhere in /etc/*.
Thus, SHLIB_PATH variable has to be explicitly assigned or you can choose to modify /etc/profile or /etc/csh.login to source /etc/SHLIB_PATH within the script itself.
=========================================
# cd /etc
# grep 'SHLIB_PATH' * 2>/dev/null
#
# grep '/etc/PATH' * 2>/dev/null
csh.login: if ( -r /etc/PATH ) then
csh.login: # present in /etc/PATH then $PATH is set to the contents
csh.login: # of /etc/PATH. Otherwise, add the contents of /etc/PATH
csh.login: -e ':/usr/bin$' /etc/PATH
csh.login: set path=($path `tr ":" " " csh.login: set path=(`tr ":" " " profile:# Modify the variables through /etc/PATH and /etc/MANPATH
profile: else if [ -r /etc/PATH ]
profile: # present in /etc/PATH then $PATH is set to the contents
profile: # of /etc/PATH. Otherwise, add the contents of /etc/PAT
H
profile: -e ":/usr/bin$" /etc/PATH
profile: PATH=`cat /etc/PATH`
profile: PATH=$PATH:`cat /etc/PATH`
=========================================
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2001 11:44 AM
03-26-2001 11:44 AM
Re: trouble setting default SHLIB_PATH environmental
NOT cat the data in /etc/SHLIB_PATH the way it did for
/etc/PATH and /etc/MANPATH, so naturally it wasn't
picked up at login.
Just had to change /etc/profile to include a:
SHLIB_PATH=`cat /etc/SHLIB_PATH`
and all was fine. Thanks!