PDA

Click to See Complete Forum and Search --> : [RESOLVED] MySQL-python


gep13
Dec 30th, 2008, 02:34 PM
Hello there,

I am trying to install MySQL-python on my server for use with subversion and MySQL.

In the past I have been able to get this installed without any problems, however, this was on an earlier version of subversion and python.

I have just installed subversion 1.5.5 and python 2.5, which i understand needs MySQL-python.1.2.2. Since I have python's easy_install i attempted to simply do:

easy_install MySQL-python

which begins installing the correct version, however, it then errors out. The last line in the error message is:

error: Setup script exited with error: command 'gcc' failed with exit status 1

Can someone point me in the direction of finding a resolution for this?

Thanks

Gary

penagate
Dec 30th, 2008, 08:28 PM
That error message means that compilation failed. Look further up in the output to see the error message(s) from the compiler. Then google for the package name and that error message if you are unsure what it means. Usually someone has come across it before.

I usually redirect output from make commands so that I can search through it later.
# make > make.log 2>&1
# make install > install.log 2>&1

This redirects standard output and standard error to log files.
If you want to watch the output while it is doing it then start the make commands in the background and use tail -f to watch the log files.
# make > make.log 2>&1 &
# tail -f make.log

gep13
Dec 31st, 2008, 08:21 AM
Hey,

Thanks again for replying!!

I sort of did what you suggested, and this is what I got when I bumped everything to a file:


running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/include/mysql -I/usr/local/include/python2.5 -c _mysql.c -o build/temp.linux-i686-2.5/_mysql.o -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv


Then, in the console window there is a number of errors also. However, there are too many to scroll all the way back up, but I have attached a screen shot of the last of it.

Does it make any sense to you?

Thanks

Gary

penagate
Jan 1st, 2009, 05:43 PM
There are errors in that file or a file which that file depends on. The messages don't mean anything in particular to me so I suggest you contact the distributor of the package.

gep13
Jan 13th, 2009, 04:42 AM
Hey,

I have tried to contact the distributor of the package, but as yet, I have not had any repsonse.

I did find the following though:

http://www.unwrongest.com/

I know this is specific to Leopard, I was just wondering whether it had any bearing on the problems I am having?

I have done steps 1-3 but I don't know what is going on in Step 4. I don't have either of the two directories that it mentions. Do you know what is going on in Step 4, maybe knowing what it is trying to do will shed some light on what I should be linking.

Thanks

Gary

gep13
Jan 17th, 2009, 07:02 AM
Hey,

For anyone who is interested, I have figured out why I was getting this error, and how to resolve it.

The error is due to the fact that I did not have the mysql-devel suite installed. In my case, all I needed to do was:


apt-get install mysql-devel


and then attempted to install mysql-python again and it worked.

Thanks

Gary