Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about LIBPATH setting?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
AIX techies;

Can someone please explain the details about setting the LIBPATH env variable? When using perl 5.8 and MySQL 3.2.x this variable is used to control search paths for shared libraries. Since I've updated my perl and mysql this variable is no longer set (its blank).

I've determined that its value is set correctly in /etc/environment and then I added it to /etc/profile and then added it to /home/username/.profile and it STILL remains blanked out.

Finally I exported the variable immediately prior to executing either perl or mysql which (sort of) works. But, its not the correct method.

So, please enlighted some of us about the setting of this?

Thanks.
 
Hello Bob,

you have to set the LIBPATH variable in your ENV file (echo $ENV). In a ksh environment it is the file .kshrc .


Regards
Stefan
 
Revisiting this topic:

"czins":

Using your recommendation I added a line to my /etc/kshrc file
which reads:

export LIBPATH=/usr/local/lib/:/usr/lib:$LIBPATH

And for some reason it does NOT set correctly. It seemed to work for a while but not any longer.

I ran a find on my system for *kshrc* and this was the ONLY such file located on the entire system. Therefore there is NO .kshrc file as you stated (which perhaps should have been in the user's login directory?).

Any thoughts? Please advise?

Thanks

Bob
 
czins was referring to creating your own .kshrc file and calling it from your .profile. Or, call the /etc/kshrc file from your .profile or /etc/profile if you want it to be used for all users.

This is how to call it from .profile:

ENV=$HOME/.kshrc
export ENV

Or, you can just set the LIBPATH in your .profile or in /etc/profile.
 
Thanks, that's what I thought.

I have been using the normal and customary /etc/profile for env variables for ALL users. However, the LIBPATH always shows up BLANK at a user level. I've check all individual .profiles as well. Perhaps I should look at the /etc/environment file for the clearing of this.

However, the newest thing is that when I try to start the MySQL client it fails with the "libreadline.a" not found. It is installed and it is in the /usr/lib as well as /lib and again, the libpath seems to be the culprit.

Oh well.
 
Ken;

It's not your imagination. But times really flies when you're having run. Right?

MySQL has been running find IN PRODUCTION. But I need to now use the mysql command line again so the issue has been revisited.

Hope this clears things up a bit!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top