FWIW, it is typically better to install mysql-python with an --rpath, e.g.

python setup.py build_ext --rpath=/path/to/mysql/lib
python setup.py install

This prevents you from ever needing to set LD_LIBRARY_PATH in programs that use the library. You might need to change the mysql-python's site.cfg file too (to be able to find mysql_config).

- C


Dieter Maurer wrote:
Ben Bartrum wrote at 2008-1-29 08:51 -0800:
...
 File "/www/zope/instance2.9.1/Products/ZMySQLDA/db.py", line 89, in ?
   import _mysql
ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No 
such file or directory

If on the command line I do: python2.4 -c 'import _mysql' I get: ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12:
open failed: No such file or directory

But if I do:
setenv LD_LIBRARY_PATH /usr/local/lib/
and then
python2.4 -c 'import _mysql'
it returns no error.

So to get the same effect for Zope, I have tried this in the zope.conf:

<environment>
    LD_LIBRARY_PATH /usr/local/lib/
</environment>

Unfortunately, this has no effect.  Any ideas?

This is too late.

The dynamic loader looks at "LD_LIBRARY_PATH" on startup
and then caches the value. Later modification have no effect
on the current process.

You need to set "LD_LIBRARY_PATH" before you start Zope.




_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to