MySQLdb build on Solaris 7

Jeff Bauer jbauer at rubic.com
Tue Feb 19 23:15:40 EST 2002


Asim writes:
> My ISP has Python 2.1 installed and I can run Python 
> CGI programs fine. I now need to connect to MySQL. I 
> need to install MySQLdb and am having difficulty 
> getting the MySQLdb source to build. I have tried
> both MySQL-python-0.9.0 and MySQL-python-0.9.1.
>
> The machine is a solaris 7 with Python 2.1 on it. When 
> I try to build it starts building and then goes into
> an infinite loop with strange libmysqlclient.a error
> messages..


Asim,

I have Andy Dustman's MySQL-python-0.9.1 interface
running with Python 2.1 on Solaris.

You probably need to edit setup.py to reflect the
locations of the libraries and include files, especially
if you have MySQL in non-standard directories.

Look for the line of code that begins with ...

  elif sys.platform == "sunos5": # Solaris 2.8 

... and edit the directories to reflect your
local configuration.

> Also since I cannot install MySQLdb in the standard 
> places on Solaris, how should I go about after the
> build step.

After installation, I've got the following installed:

  /usr/local/lib/python2.1/site-packages/

  CompatMysqldb.py        _mysql.so
  CompatMysqldb.pyc       _mysql_exceptions.py
  MySQLdb/                _mysql_exceptions.pyc

... and ...

  /usr/local/lib/python2.1/site-packages/MySQLdb/

  __init__.py       constants/        cursors.pyc  times.pyc
  __init__.pyc      converters.py     sets.py
  connections.py    converters.pyc    sets.pyc
  connections.pyc   cursors.py        times.py

If you have a similar file/path structure somewhere in your
importable PYTHONPATH, you should be okay.

Jeff Bauer
Rubicon Research




More information about the Python-list mailing list