/usr/lib/python2.3/site-packages/_mysql.so: undefined symbol

francescomoi at usa.com francescomoi at usa.com
Thu Sep 15 19:20:38 CEST 2005


Hello.

Python 2.3.4 (#1, Feb  2 2005, 12:11:53)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
MySQL-python-1.2.0

I'm trying to execute this script:
----------------------
#!/usr/bin/python
import MySQLdb
conn = MySQLdb.connect (host = "localhost", user = "root", passwd =
"xxxx", db = "test")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row0
cursor.close ()
conn.close ()
------------------

But I get this error message:
--------------------
[ ]# python test.py
Traceback (most recent call last):
  File "test.py", line 2, in ?
    import MySQLdb
  File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 27,
in ?
    import _mysql
ImportError: /usr/lib/python2.3/site-packages/_mysql.so: undefined
symbol: mysql_rollback
--------------------

What am I doing wrong?




More information about the Python-list mailing list