[Zope-DB] ImportError: libmysqlclient_r.so.15

Michele Marcionelli michele.marcionelli at math.ethz.ch
Wed Nov 7 15:31:37 EST 2007


Hello Zope-DB members

I'm migrating my zope/python/mysql/... installation from RedHat 3 to  
RedHat 5 and I still have a little problem.

If I just start python and enter "import MySQLdb" I get the following  
error:

> Python 2.3.6 (#1, Nov  7 2007, 17:02:40)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import MySQLdb
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/scratch/local/app/python/current/lib/python2.3/site- 
> packages/PIL/__init__.py", line 19, in ?
>
>   File "build/bdist.linux-i686/egg/_mysql.py", line 7, in ?
>   File "build/bdist.linux-i686/egg/_mysql.py", line 6, in  
> __bootstrap__
> ImportError: libmysqlclient_r.so.15: cannot open shared object  
> file: No such file or directory

If I do the same after setting the LD_LIBRARY_PATH to /usr/local/lib/ 
mysql, I did not get error messages anymore!

Now the problem: I included the LD_LIBRARY_PATH to my startup-script  
zopectl (see below) but I still get the same error message in the  
event.log file:

> 2007-11-07T20:53:24 ERROR Zope Could not import Products.ZMySQLDA
> Traceback (most recent call last):
>   File "/scratch/local/app/zope/2.8.9.1-2.3.6/lib/python/OFS/ 
> Application.py", line 695, in import_product
>     product=__import__(pname, global_dict, global_dict, silly)
>   File "/scratch/ZOPE/TEMPLATE_ZOPE-2.8.9.1_SILVA-1.5.10/Products/ 
> ZMySQLDA/__init__.py", line 91, in ?
>     import DA
>   File "/scratch/ZOPE/TEMPLATE_ZOPE-2.8.9.1_SILVA-1.5.10/Products/ 
> ZMySQLDA/DA.py", line 92, in ?
>     from db import DB
>   File "/scratch/ZOPE/TEMPLATE_ZOPE-2.8.9.1_SILVA-1.5.10/Products/ 
> ZMySQLDA/db.py", line 89, in ?
>     import _mysql
>   File "build/bdist.linux-i686/egg/_mysql.py", line 7, in ?
>   File "build/bdist.linux-i686/egg/_mysql.py", line 6, in  
> __bootstrap__
> ImportError: libmysqlclient_r.so.15: cannot open shared object  
> file: No such file or directory

Any idea?

My versions:

> Zope-2.8.9.1-final
> Python-2.3.6
> MySQL-python-1.2.2
> mysql-5.0.45

The "zopectl" file:

> #! /bin/bash
>
> PYTHON="/scratch/local/app/python/2.3.6/bin/python"
> ZOPE_HOME="/scratch/local/app/zope/2.8.9.1-2.3.6"
>
> reldir=`dirname $0`
> INSTANCE_HOME=`cd $reldir/..; pwd`
> CONFIG_FILE="$INSTANCE_HOME/etc/zope.conf"
>
> SOFTWARE_HOME="/scratch/local/app/zope/2.8.9.1-2.3.6/lib/python"
> PYTHONPATH="$SOFTWARE_HOME"
>
> export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME
>
> export TEMP=/tmp
> export LD_LIBRARY_PATH=/usr/local/lib/mysql
> export PYTHON_EGG_CACHE=$INSTANCE_HOME/var/.python-eggs
>
> ZDCTL="$SOFTWARE_HOME/Zope2/Startup/zopectl.py"
>
> exec "$PYTHON" "$ZDCTL" -C "$CONFIG_FILE" "$@"

Grazie,
Michele

--
ETH Zürich
Michele Marcionelli
IT Support Gruppe D-MATH
HG G 18
Rämistrasse 101
CH–8092 Zürich

michele.marcionelli at math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1404 Fax




More information about the Zope-DB mailing list