My linux is CentOS 4.4
apache 2.0.59 (compiled from source tar ball)
Python 2.3.4 (stock rpm)
mysql-python 3.2.10
mysql 5.0.27 (compiled from source tar ball)
I downloaded mysql python 1.2.1p1. I built mysql python thru command
python setup.py build , however it return error [root@test MySQL-python-1.2.1_p2]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.3/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -shared build/temp.linux-i686-2.3/_mysql.o /usr/local/mysql/lib/mysql/libmysqlclient_r.a -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -o build/lib.linux- i686-2.3/_mysql.so
gcc: /usr/local/mysql/lib/mysql/libmysqlclient_r.a: No such file or directory
error: command 'gcc' failed with exit status 1
My linux is CentOS 4.4
apache 2.0.59 (compiled from source tar ball)
Python 2.3.4 (stock rpm)
mysql-python 3.2.10
mysql 5.0.27 (compiled from source tar ball)
I downloaded mysql python 1.2.1p1. I built mysql python thru command
python setup.py build , however it return error
[root@test MySQL-python-1.2.1_p2]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.3/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -shared build/temp.linux-i686-2.3/_mysql.o /usr/local/mysql/lib/mysql/libmysqlclient_r.a -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -o build/lib.linux- i686-2.3/_mysql.so
gcc: /usr/local/mysql/lib/mysql/libmysqlclient_r.a: No such file or directory
error: command 'gcc' failed with exit status 1
my mysql compile options are
CC=gcc CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" \ CXX=gcc CXXFLAGS="-O3 -march=i686 -pipe -felide-constructors\ -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql-5.0.27\
--enable-assembler --with-mysqld-ldflags=-all-static --enable-shared \ --without-debug --without-innodb --with-extra-charsets=gb2312,utf8,big5,gbk\ --without-bench
and I have add path of mysq lib in the ld.so.conf