Menu

ImportError for _mysql.so (RHEL AS4)

Help
Syrae
2009-03-14
2012-09-19
  • Syrae

    Syrae - 2009-03-14

    My python version is 2.4.4. This is Red Hat Linux, so it's not a strange OS. I did not use yum to install it since I need this to install for a different version of python than the one that yum uses, so when I ran setup.py, I ran it with my alternate version.

    I grabbed a .tar.gz package, ran '/usr/bin/python2.4 setup.py build' and also the install. I left that directory, started up python and tried to see if it was installed properly.

    >>> import MySQLdb
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "build/bdist.linux-x86_64/egg/MySQLdb/init.py", line 19, in ?
    File "build/bdist.linux-x86_64/egg/_mysql.py", line 7, in ?
    File "build/bdist.linux-x86_64/egg/_mysql.py", line 6, in bootstrap
    ImportError: /root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-x86_64.egg-tmp/_mysql.so: cannot open shared object file: No such file or directory

    I spent the better part of a day trying to figure this out. I could only find one other person on the web with this particular error, and it is a web server running django.

    Now, my co-worker is also running a nearly identical system as mine. Same OS, same python, same environment set up, etc. He has no problems with the MySQLdb. I have even had this library working before I had to reinstall it and several other packages. Neither of us can figure out why this problem has cropped up now.

     
    • Leo Hourvitz

      Leo Hourvitz - 2009-03-14

      When I've run into this, it's been some version mismatch in a dependent library. I've always had to go back and compile mysql-python from source.

       
      • Syrae

        Syrae - 2009-03-16

        Do you mean doing the setup.py build again? I've cleaned things up and re-run that a few times and it didn't seem to help.

         
      • Syrae

        Syrae - 2009-03-16

        Do you mean doing the setup.py build again? I've cleaned things up and re-run that a few times and it didn't seem to help.

         
      • Syrae

        Syrae - 2009-03-16

        So, evidently we had 32-bit python installed and not 64-bit python as it should have been for this application.

         

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.