[Zope] ZMySQLDA Help

Dennis Allison allison@sumeru.stanford.EDU
Wed, 10 Jul 2002 08:17:00 -0700


There's not much infomration to go on here :-)   

What's wrong is that the gcc compile of the _mysql routine requird by
MySQL-python-0.9.1 is failing.  From the information you provide here
it's not possible to figure out what's causing your problem.   Did you
install the full set of Python develpment and libraries when you rebuilt
your system?  The README cautions:

   If you have Red Hat Linux or a similar packaging system, make sure
   you have the Python development headers and libraries (python-devel).
   For Python-2.x versions, this is python2-devel.

Send me a full trace of the output of the failed install off list and
I'll try to determine what's failing.

	-d

----------------------------------

"Todd Loomis, DMSO \(SAIC\)" <tloomis@dmso.mil> writes:

>I get the following error when I try this /var/www/zope/bin/python setup.py
>build.
>
>error: command 'gcc' failed with exit status 1
>
>What's wrong
>
>Thanks,
>Todd
>
>-----Original Message-----
>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
>Dennis Allison
>Sent: Tuesday, July 09, 2002 6:17 PM
>
>OK, which zope and which python are you using?  Zope requires python
>2.1.3.  RH7.3 ships with Python 1.5 and Python 2.2.    The Linux binary
>distribution of Zope includes python 2.1.3--it's what I use.
>
>You'll need the source tarballs or the SRPMs for MySQL-python-0.9.1-1py2.
>Both MySQL-python and ZMySQLDA use distutils.  In the directory for each
>product execute
>
>	/var/www/zope/bin/python setup.py build
>	/var/www/zope/bin/python setup.py install
>
>Note that you *must* use the python used with zope as that's the way all
>the proper libraries and path are identified.  After a bit of fuss, some
>C compiles, and the like, you should be in business.
>
>Good luck.
>
>	-d
>
>-----
>
>> I've just rebuilt my system RedHat 7.3 with zope I used the following to
>> still get the below errors anything to help?
>>
>> files used:
>> - MySQL-python-0.9.1-1py1.i386.rpm
>> - MySQL-python-0.9.1-1py2.i386.rpm
>> - ZMySQLDA-2.0.8.tar.gz
>>
>> error:
>> 2002-07-09T20:27:15 ERROR(200) Zope Could not import Products.ZMySQLDA
>> Traceback (innermost last):
>>   File /var/www/zope/lib/python/OFS/Application.py, line 531, in
>> import_product
>>   File /var/www/zope/lib/python/Products/ZMySQLDA/__init__.py, line 91, in
>?
>>   File /var/www/zope/lib/python/Products/ZMySQLDA/DA.py, line 92, in ?
>>   File /var/www/zope/lib/python/Products/ZMySQLDA/db.py, line 89, in ?
>> ImportError: No module named _mysql
>>
>> Thanks,
>> Todd
>>
>> From: Dennis Allison [mailto:allison@sumeru.stanford.EDU]
>>
>> Install gcc?
>>
>> What system are you running on?  You need to install two things -- the
>> python adaptor for MySQL and the zope adaptor.  In a linux environment
>> I just followed the instructions at Zope.org and everything came up
>> neatly.  With other environments, YMMV.
>>
>> I use MySQL-python-0.9.1.  and ZMySQLDA-2.0.8 both distributed as
>tarballs.
>> You do have to compile some C code--hence the need for gcc.  Look at the
>> setup.py
>> programs to set configuration stuff.
>>
>> >I just tried and I still can't seem to get it to work it gives me the
>> following
>> >message when I run python2.1 setup.py build:
>> >
>> >error: command 'gcc' failed with exit status 1
>> >
>> >Anything else I need to do?
>> >
>> >Quoting Dennis Allison <allison@sumeru.stanford.EDU>:
>> >
>> >> You need to install it in the Zope version of python.  Run setup in the
>> >> ZMySQLDA
>> >> directory with the version of python you are using for Zope.
>> >>