Mailing List Archive

"libmysqlclient.so.6" not found. (what does /sbin/ldconfig /usr/local/lib/mysql do ?)
When building Python from source, and with the MySQLmodule in the
Modules directory, I got the following error :

Shared object "libmysqlclient.so.6" not found
*** Error code 1

But libmysqlclient.so.6 does indeed exist in /usr/local/lib/mysql.

Fortunately, somebody had come across this in a previous post/thread
and the cure was to run " /sbin/ldconfig /usr/local/lib/mysql" before
compiling. Sure enough this worked and now I have a fully functioning
Python interpreter (and environment) :)

However, upon rebooting the machine, if I try to run a Python program
it will again complain that "libmysqlclient.so.6" can not be found
(since the MySQLmodule is shared). Once again
running " /sbin/ldconfig /usr/local/lib/mysql" cures the problem but
does this mean that I have to run it each and every time I restart the
computer, as part of my startup scripts ? Is this error indicative of
there being a larger problem or misconfiguration ?

Thanking you in advance,

chas


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
"libmysqlclient.so.6" not found. (what does /sbin/ldconfig /usr/local/lib/mysql do ?) [ In reply to ]
Hi!

You havn't mention your OS and version, looking for ldconfig I think it
is Linux.
To permanently add /usr/local/lib/mysql to ld search directory path, add
it to /etc/ld.so.conf file (it is just plain text file - add yet another
line to the end of the file) and run ldconfig without parameters to rebuild
ld.so.cache.

On Fri, 23 Jul 1999 sweeting@neuronet.com.my wrote:
> When building Python from source, and with the MySQLmodule in the
> Modules directory, I got the following error :
>
> Shared object "libmysqlclient.so.6" not found
> *** Error code 1
>
> But libmysqlclient.so.6 does indeed exist in /usr/local/lib/mysql.
>
> Fortunately, somebody had come across this in a previous post/thread
> and the cure was to run " /sbin/ldconfig /usr/local/lib/mysql" before
> compiling. Sure enough this worked and now I have a fully functioning
> Python interpreter (and environment) :)
>
> However, upon rebooting the machine, if I try to run a Python program
> it will again complain that "libmysqlclient.so.6" can not be found
> (since the MySQLmodule is shared). Once again
> running " /sbin/ldconfig /usr/local/lib/mysql" cures the problem but
> does this mean that I have to run it each and every time I restart the
> computer, as part of my startup scripts ? Is this error indicative of
> there being a larger problem or misconfiguration ?

It is not misconfiguration - but ld should know where to find .so files.

> Thanking you in advance,
>
> chas

Oleg.
----
Oleg Broytmann Netskate/Inter.Net.Ru phd@emerald.netskate.ru
Programmers don't die, they just GOSUB without RETURN.
"libmysqlclient.so.6" not found. (what does /sbin/ldconfig /usr/local/lib/mysql do ?) [ In reply to ]
On Fri, Jul 23, 1999 at 09:21:55AM +0000, sweeting@neuronet.com.my wrote:

> However, upon rebooting the machine, if I try to run a Python program
> it will again complain that "libmysqlclient.so.6" can not be found
> (since the MySQLmodule is shared). Once again
> running " /sbin/ldconfig /usr/local/lib/mysql" cures the problem but
> does this mean that I have to run it each and every time I restart the
> computer, as part of my startup scripts ? Is this error indicative of
> there being a larger problem or misconfiguration ?

Add /usr/local/lib/mysql to your /etc/ld.so.conf. It contains a list
(seperated by newlines, if i'm correct) of directories to add to the dynamic
linker/loader search path.

Alternatively (and imho preferable over adding to your ld.so.conf each time)
place a symbolic link in /usr/local/lib or /usr/lib to point to
/usr/local/lib/mysql/libmysqldclient.so.6. That way you dont suffer the
clutter of dos-like PATH addenda :)

--
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
"libmysqlclient.so.6" not found. (what does /sbin/ldconfig /usr/local/lib/mysql do ?) [ In reply to ]
sweeting@neuronet.com.my <sweeting@neuronet.com.my> wrote:

> When building Python from source, and with the MySQLmodule in the
> Modules directory, I got the following error :
>
> Shared object "libmysqlclient.so.6" not found
> *** Error code 1
>
> But libmysqlclient.so.6 does indeed exist in /usr/local/lib/mysql.

Put the directory in your /etc/ld.so.conf, then run ldconfig without any
arguments and you're all set.


Cheers,

//Klaus

--
···[ Magnetic Ink ]·················································· ><> ···
···[ http://www.magnetic-ink.dk/ ]···········································
"libmysqlclient.so.6" not found. (what does /sbin/ldconfig /usr/local/lib/mysql do ?) [ In reply to ]
Thank you Klaus & Oleg & Thomas for the instructions on updating
/etc/ld.so.conf

> You havn't mention your OS and version, looking for
> ldconfig I think it is Linux.

Whilst it looked like a very Linux-life-thing, I'm actually
using FreeBSD. We don't have /etc/ld.so.conf but I did find
'ldconfig' in the /etc/rc boot script.

Then again, Thomas' idea of the symlink was also very appealing :

> Alternatively (and imho preferable over adding to your ld.so.conf
> each time) place a symbolic link in /usr/local/lib or /usr/lib to
> point to /usr/local/lib/mysql/libmysqlclient.so.6. That way you
> dont suffer the clutter of dos-like PATH addenda :)

A simple :

ln -s /usr/local/lib/mysql/libmysqlclient.so.6
/usr/lib/libmysqlclient.so.6

did the trick :-)

Thank you very much, to one and all, for your help,

chas

> To permanently add /usr/local/lib/mysql to ld search directory
> path, add it to /etc/ld.so.conf file (it is just plain text file
> - add yet another line to the end of the file) and run ldconfig
> without parameters to rebuild ld.so.cache.



> On Fri, 23 Jul 1999 sweeting@neuronet.com.my wrote:
> > When building Python from source, and with the MySQLmodule in the
> > Modules directory, I got the following error :
> >
> > Shared object "libmysqlclient.so.6" not found
> > *** Error code 1
> >
> > But libmysqlclient.so.6 does indeed exist in /usr/local/lib/mysql.
> >
> > Fortunately, somebody had come across this in a previous
post/thread
> > and the cure was to run " /sbin/ldconfig /usr/local/lib/mysql"
before
> > compiling. Sure enough this worked and now I have a fully
functioning
> > Python interpreter (and environment) :)
> >
> > However, upon rebooting the machine, if I try to run a Python
program
> > it will again complain that "libmysqlclient.so.6" can not be found
> > (since the MySQLmodule is shared). Once again
> > running " /sbin/ldconfig /usr/local/lib/mysql" cures the problem
but
> > does this mean that I have to run it each and every time I restart
the
> > computer, as part of my startup scripts ? Is this error indicative
of
> > there being a larger problem or misconfiguration ?
>
> It is not misconfiguration - but ld should know where to find .so
files.
>
> > Thanking you in advance,
> >
> > chas
>
> Oleg.
> ----
> Oleg Broytmann Netskate/Inter.Net.Ru
phd@emerald.netskate.ru
> Programmers don't die, they just GOSUB without RETURN.
>
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.