Menu

error on import _mysql

Help
litium
2006-11-09
2012-09-19
  • litium

    litium - 2006-11-09

    hi i'm using Redhat EL4 and having this lame problem. yes i know this might be very simple to solve but i just can't get it right. anybody can help me?

    here is what i got when importing MySQLdb

    Python 2.3.4 (#1, Nov 4 2004, 14:06:56)
    [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import _mysql
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: /usr/lib/mysql/libmysqlclient_r.so.14: undefined symbol: uncompress
    >>>

    FYI, here is my rpm details:
    mysql-devel-4.1.7-4.RHEL4.1
    mysql-server-4.1.7-4.RHEL4.1
    mysql-4.1.7-4.RHEL4.1
    mod_auth_mysql-2.6.1-2.1
    mysql-bench-4.1.7-4.RHEL4.1

    thanks people.
    python-devel-2.3.4-14
    MySQL-python-1.0.0-1.RHEL4.1

     
    • Brad Smith

      Brad Smith - 2006-11-09

      "unresolved symbols" generally implies that something (libmysqlclient_r.so in this case) is compiled against a library that doesn't exist. I would double-check that you have all of the dependancies for MySQLdb and mysql installed. fwiw, "import _mysql" works fine on my RHEL4 box with the same mysql and mysql-python versions.

      What happens when you do "import MySQLdb"?

       
    • litium

      litium - 2006-11-10

      actually, i got the same error when importing MySQLdb

      Python 2.3.4 (#1, Nov 4 2004, 14:06:56)
      [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import MySQLdb
      Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/usr/lib/python2.3/site-packages/MySQLdb/init.py", line 19, in ?
      import _mysql
      ImportError: /usr/lib/mysql/libmysqlclient_r.so.14: undefined symbol: uncompress

       
      • Andy Dustman

        Andy Dustman - 2006-11-12

        The answer is in the README. Hint: zlib

         
        • litium

          litium - 2006-11-13

          adustman,

          zlib devel are allready installed in my RH.

          [adiman@development01 ~]$ rpm -qa |grep zlib
          zlib-1.2.1.2-1
          zlib-devel-1.2.1.2-1

           
    • Andy Dustman

      Andy Dustman - 2006-11-13

      Are you actually building your own MySQLdb or not? MySQL-python is MySQLdb. Surely you're not using 1.0.0. You may have conflicting packages/libraries.

      What is the output of these commands?

      ldd /usr/lib/mysql/libmysqlclient.so.14
      ldd /usr/lib/python2.3/site-packages/_mysql.so

       
    • litium

      litium - 2006-11-14

      previously, i've build my MySQLdb without removing the existing MySQL-python-1.0.0-1.RHEL4.1. now, i removed the rpm and rebuild MySQLdb but the result is still the same.

      well, here is what i got:

      [root@development01]# ldd /usr/lib/mysql/libmysqlclient.so.14
      libcrypt.so.1 => /lib/libcrypt.so.1 (0x0063e000)
      libnsl.so.1 => /lib/libnsl.so.1 (0x00395000)
      libm.so.6 => /lib/tls/libm.so.6 (0x00c76000)
      libz.so.1 => /usr/lib/libz.so.1 (0x00d8e000)
      libc.so.6 => /lib/tls/libc.so.6 (0x00b4b000)
      /lib/ld-linux.so.2 (0x00b32000)
      [root@development01]# ldd /usr/lib/python2.3/site-packages/_mysql.so
      libmysqlclient_r.so.14 => /usr/lib/mysql/libmysqlclient_r.so.14 (0x00cc8000)
      libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00255000)
      libcrypt.so.1 => /lib/libcrypt.so.1 (0x00111000)
      libnsl.so.1 => /lib/libnsl.so.1 (0x00601000)
      libm.so.6 => /lib/tls/libm.so.6 (0x00324000)
      libc.so.6 => /lib/tls/libc.so.6 (0x00347000)
      /lib/ld-linux.so.2 (0x00b32000)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.