Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1

在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1,

 

具体原因是因为没有安装mysql-devel包

 

使用yum install mysql-devel成功解决。

 

才想起来在运行python setup.py build 的时候先报一个错误,是因为没有安装setuptools。

得先安装一个setuptools-0.6c11就好了。具体步骤如下:

需要的软件包:setuptools-0.6c11.tar.gz 
                     MySQL-python-1.2.3.tar.gz
               
1.安装setuptools-0.6c11
wget --no-check-certificate  http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxf setuptools-0.6c11.tar.gz && cd setuptools-0.6c11
python setup.py build
python setup.py install

2.安装MySQL-python-1.2.3
wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download
tar zxf MySQL-python-1.2.3.tar.gz && cd MySQL-python-1.2.3
python setup.py build
python setup.py install

转载于:https://www.cnblogs.com/ansonz/p/4169120.html

你可能感兴趣的:(Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1)