Donate Share

MySQL for Python

Tracker: Bugs

5 Wrong library path under Mac OS X 10.4 & Python 2.4 - ID: 1768305
Last Update: Comment added ( shaffali )

The path to the libmysqlclient_r.15.dylib is wrong under Mac OS X 10.4 in
connection with Python 2.5 and MySQL 5 (standard disk image from
mysql.com):

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.3-fat/egg/MySQLdb/__init__.py", line 19, in
<module>
ImportError: dlopen(./_mysql.so, 2): Library not loaded:
/usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib
Referenced from: ./_mysql.so
Reason: image not found

The actual path is normally /usr/local/mysql/lib/libmysqlclient_r.15.dylib

but somehow, an additional mysql/ is added after lib/ :
/usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib

Is there a way to give the program the correct path? Is this a problem from
the mysql_config program? It seems to show the path like this:
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -Os -arch i386
-fno-common]
--include [-I/usr/local/mysql/include]
--libs [-L/usr/local/mysql/lib/mysql -lmysqlclient -lz
-lm]
--libs_r [-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz
-lm]
--socket [/tmp/mysql.sock]
--port [3306]
--version [5.0.45]
--libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lz -lm]

but I didn't change that after installation and other programs requiring
this path seem to work fine...


S.J.S. ( compas1 ) - 2007-08-06 12:55

5

Open

None

Andy Dustman

MySQLdb

MySQLdb-1.2

Public


Comments ( 2 )

Date: 2007-09-07 19:01
Sender: shaffali


Hi,

I am using MacBook (Intel) and having similar issues as above. The other
specification are:
- Python 2.5
- MySQL 5.0.45

The one difference is when I execute the mysql_config, i get a slightly
different result:
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -Os -arch i386
-fno-common]
--include [-I/usr/local/mysql/include]
--libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
--libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lm]
--socket [/tmp/mysql.sock]
--port [3306]
--version [5.0.45]
--libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lm] <=====
Difference in the last line.

Hope it helps in resolving the problems.

Regards,

Amit



Date: 2007-08-06 12:56
Sender: compas1


sorry, I mistyped the Python version in the title, it's 2.5 as stated in
the text.


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.