[Zope] MySQL-python-1.2.2 ImportError

SolidEther solidether at gmx.net
Tue Jan 20 16:49:20 EST 2009


Hi Everyone,

I am having trouble to make use of a compiled version of MySQL- 
python-1.2.2 with Zope/Python under OpenSolaris snv_101b.

I installed Zope/Plone (running) and need mysql-python to be compiled  
with the python version (2.4) that came with zope. I further compiled  
MySQL 5.1.30 and it is running fine.

MySQL-python-1.2.2 actually builds and installs fine:

[...]
Installed /opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ 
MySQL_python-1.2.2-py2.4-solaris-2.11-i86pc.egg
[...]

But when I want to test the module with the zope-pyhton, I get this  
error:

 >>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "build/bdist.solaris-2.11-i86pc/egg/MySQLdb/__init__.py", line  
19, in ?
  File "build/bdist.solaris-2.11-i86pc/egg/_mysql.py", line 7, in ?
  File "build/bdist.solaris-2.11-i86pc/egg/_mysql.py", line 6, in  
__bootstrap__
ImportError: ld.so.1: python: fatal: libmysqlclient_r.so.16: open  
failed: No such file or directory

Having a look at sys.path reveals:

 >>> print sys.path
['/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ 
setuptools-0.6c8-py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/ 
site-packages/PILwoTk-1.1.6.3-py2.4-solaris-2.11-i86pc.egg', '/opt/ 
Plone-3.1/Python-2.4/lib/python2.4/site-packages/Cheetah-2.0.1-py2.4- 
solaris-2.11-i86pc.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/site- 
packages/Paste-1.6-py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/ 
python2.4/site-packages/PasteDeploy-1.3.1-py2.4.egg', '/opt/Plone-3.1/ 
Python-2.4/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg', '/ 
opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZopeSkel-1.8- 
py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ 
MySQL_python-1.2.2-py2.4-solaris-2.11-i86pc.egg', '', '/opt/Plone-3.1/ 
Python-2.4/lib/python24.zip', '/opt/Plone-3.1/Python-2.4/lib/ 
python2.4', '/opt/Plone-3.1/Python-2.4/lib/python2.4/plat-sunos5', '/ 
opt/Plone-3.1/Python-2.4/lib/python2.4/lib-tk', '/opt/Plone-3.1/ 
Python-2.4/lib/python2.4/lib-dynload', '/opt/Plone-3.1/Python-2.4/lib/ 
python2.4/site-packages']

and further checking for 'libmysqlclient_r.so.16' (I added that sym- 
link later on):

# ll /opt/Plone-3.1/Python-2.4/lib/python2.4/libmysqlclient_r.so.16
lrwxrwxrwx   1 root     root          43 Jan 20 17:46 /opt/Plone-3.1/ 
Python-2.4/lib/python2.4/libmysqlclient_r.so.16 -> /opt/mysql/mysql/ 
lib/libmysqlclient_r.so.16*
# ll /opt/mysql/mysql/lib/libmysqlclient_r.so.16
lrwxrwxrwx   1 root     root          47 Dec 18 12:07 /opt/mysql/mysql/ 
lib/libmysqlclient_r.so.16 -> /opt/mysql/mysql/lib/libmysqlclient_r.so. 
16.0.0*
# ll /opt/mysql/mysql/lib/libmysqlclient_r.so.16.0.0
-rwxr-xr-x   1 root     bin      5632336 Nov 15 20:35 /opt/mysql/mysql/ 
lib/libmysqlclient_r.so.16.0.0*

So, actually everything is there. I am running out of ideas here.

Any suggestions of how I could get this working?

Thx & Cheers,
Michael


More information about the Zope mailing list