installing python MySQL/ZMySQLdb on FreeBSD
hi Andy; I've been trying to get your MySQL-python and ZMySQLdb products to run on my FreeBSD Zope setup and have had no luck thusfar. I'm wondering if you've received any feedback from your FreeBSD users on successful setup procedures? Zope doesn't seem to like the _mysql.so file and responds with "...site-packages/_mysql.so: ELF file OS ABI invalid" Some searches on Google suggest that this is a problem of using a Linux library on a BSD machine, however I've upgraded the libraries to the latest versions using packages from BSD themselves and am still having the same problem. Any workarounds you could suggest would be appreciated. thanks Davis Marques zope error message --- 2002-05-06T21:30:23 ERROR(200) Zope Could not import Products.ZMySQLDA Traceback (innermost last): File /usr/local/Zope-2.5.1-linux2-x86/lib/python/OFS/Application.py, line 531, in import_product File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ? File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/DA.py, line 92, in ? File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/db.py, line 89, in ? ImportError: /usr/local/Zope-2.5.1-linux2-x86/lib/python2.1/site-packages/_mysql.so: ELF file OS ABI invalid Davis _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com
Hey all... I have recently gone though this process with the maintainer of the zmysqlda port. We have a working mysql interface thanks to him... It does require a workaround to get it to work. Here are the details: Johann Visagie <johann@egenetics.com> wrote: It turns out that a recent series of patches that was made to the FreeBSD Python ports to make it easier for multiple versions to co-exist actually ended up breaking things. In theory, if a port specifies USE_PYTHON and a version of Python has already been installed on the system, that version of Python should be used. At the moment, though, if a port specifies USE_PYTHON and does not explicitly specify PYTHON_VERSION, that port will always install Python 2.2.1 (if it's not already installed), and if the port is a Python module or package, it will be installed for Python 2.2.1 In other words, the www/zope port will (correctly) install Python 2.1.3 and work with it, but the www/zope-zmysqlda and databases/py-MySQLdb ports will (wrongly) insist on using Python 2.2.1 :-( I've contacted Thomas Gellekum, the maintainer of the Python infrastructure in FreeBSD's ports tree about this. You can see the patches that causes the problem here: http://www.freebsd.org/cgi/query-pr.cgi?pr=36353 See also my comment on it down at the very bottom. So let's insert another step in the workaround:
So what's the solution/workaround? I'd say it should work if you simply install the Zope port itself *first* on a clean system.
If it's possible to mess with the system to this extent, I would suggest:
- First deinstall all versions of Python, i.e. do a:
pkg_info | grep py
... and then pkg_delete(1) them all. (Or just use "pkg_deinstall -r python" if you're using knu's pkgtools.)
- Install the Zope port:
cd /usr/ports/www/zope && make install clean
I _think_ things will work if at this point one symlinked /usr/local/bin/python2.1 to /usr/local/bin/python. I'll just double-check this. (Nasty workaround, but it'll have to do until bsd.python.mk get fixed.)
- *Then* install the ZMySQLda port:
cd /usr/ports/www/zope-zmysqlda && make install clean
On Mon, 6 May 2002, davis marques wrote:
hi Andy;
I've been trying to get your MySQL-python and ZMySQLdb products to run on my FreeBSD Zope setup and have had no luck thusfar. I'm wondering if you've received any feedback from your FreeBSD users on successful setup procedures?
Zope doesn't seem to like the _mysql.so file and responds with "...site-packages/_mysql.so: ELF file OS ABI invalid" Some searches on Google suggest that this is a problem of using a Linux library on a BSD machine, however I've upgraded the libraries to the latest versions using packages from BSD themselves and am still having the same problem.
Any workarounds you could suggest would be appreciated.
thanks
Davis Marques
zope error message ---
2002-05-06T21:30:23 ERROR(200) Zope Could not import Products.ZMySQLDA Traceback (innermost last): File /usr/local/Zope-2.5.1-linux2-x86/lib/python/OFS/Application.py, line 531, in import_product File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ? File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/DA.py, line 92, in ? File /usr/local/Zope-2.5.1-linux2-x86/lib/python/Products/ZMySQLDA/db.py, line 89, in ? ImportError: /usr/local/Zope-2.5.1-linux2-x86/lib/python2.1/site-packages/_mysql.so: ELF file OS ABI invalid
Davis
_________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Green Graphics ::: Print and Web Design ::: 510.923.0000
participants (2)
-
davis marques -
Ed Colmar