Installing MySQL-python-0.9.2 on Solaris 2.9

Gilles Lenfant glenfant at NOSPAM.bigfoot.com
Tue Apr 22 17:15:53 EDT 2003


"Eduardo Castro" <ecastro at calarts.edu> a écrit dans le message de news:
mailman.1051034858.6946.python-list at python.org...
>
> Hi, has anyone had problems installing MySQL-python-0.9.2 on Solaris 2.9?
>
> I am getting the following error when I run 'setup.py build'
>
> ld: fatal: library -lmysqlclient: not found
>
>
> This is part of the error messages:
>
> building '_mysql' extension
> skipping _mysql.c (build/temp.solaris-2.9-sun4u-2.2/_mysql.o up-to-date)
> gcc -shared build/temp.solaris-2.9-sun4u-2.2/_mysql.o -L/usr/lib/mysql
> -L/usr/local/lib/mysql -L/usr/loca/mysql/lib -L/usr/local/mysql/lib/mysql
> -L/usr/local/mysql/include -L/usr/bin
> -Wl,-R/usr/local/lib:/usr/openwin/lib:/usr/dt/lib -lmysqlclient -lz -o
> build/lib.solaris-2.9-sun4u-2.2/_mysql.so
> ld: fatal: library -lmysqlclient: not found
> ld: fatal: File processing errors. No output written to
> build/lib.solaris-2.9-sun4u-2.2/_mysql.so
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
>
> Thanks
>
> Eduardo Castro
> California Institute of the Arts.
>

Fell on this on a FreeBSD box

$ locate libmysqlclient

should find something like...

/usr/local/lib/mysql/libmysqlclient.so.10

but perhaps somewhere else for you.

Just cd to a place of your ld path (/usr/local/lib/mysql may be a good
place)

$ ln -s /usr/local/lib/mysql/libmysqlclient.so.10 libmysqlclient.so

If "locate" doesn't find anything, you must install MySQL client package
before building MySQL-python.

HTH

--Gilles





More information about the Python-list mailing list