您的位置:首页 > 编程语言 > PHP开发

php编译错误Note that the MySQL client library is not bundled anymore或者cannot find mysql header file

2013-07-28 16:37 447 查看
rpm -ivh MySQL-devel-community-5.1.57-1.sles10.x86_64.rpm

export PATH=/usr/local/services/libxml2-2.7.2/bin:$PATH

cp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so

./configure --prefix=/usr/local/services --with-mysql=/usr/include/mysql/ --with-curl=/usr/local/services/curl-7.15.0 --with

-libxml-dir=/usr/local/services/libxml2-2.7.2 --enable-fastcgi --enable-fpm --with-mcrypt=/usr/local/services/libmcrypt-

2.5.8 --with-zlibwhere

make

make install

/////////////////////////////////////

php编译错误Note that the MySQL client library is not bundled anymore!

##### install php

##download http://jp.php.net/downloads.php
wget http://jp.php.net/get/php-5.2.9.tar.gz/from/this/mirror
rpm -qa | grep php

rpm -e php-ldap-5.1.6-20.el5 php-5.1.6-20.el5

tar -zxvf php-5.2.9.tar.gz

cd php-5.2.9

./configure --prefix=/usr/local/php --with-mysql=/usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/ --with-

apxs2=/usr/local/apache2/bin/apxs

到最后报错:

configure: error: Cannot find MySQL header files under /usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/.

Note that the MySQL client library is not bundled anymore!

解决方法。

1. 查看系统有没有安装mysql header

find / -name mysql.h

如果有。请指定--with-mysql=/跟正常路径。

如果没有。请看下一步。

2.redhat安装

rpm -ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm

3.最后一步php的配置选项添加--with-mysql=/usr即可!

完整的编译参数:

/configure --with-apxs2=/usr/local/apache2/bin/apxs --includedir=/usr/local/include --enable-force-cgi-redirect --enable-

mailparse --enable-mbstring --enable-mbregex --enable-mbstr-enc-trans --enable-trans-sid --enable-shmop --enable-exif --with

-gd --with-jpeg-dir=/usr/local/lib/ --with-png-dir=/usr/local/lib/ --with-zlib-dir=/usr/include/ --enable-gd-native-ttf --

enable-gd-jis-conv --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql --enable-sockets --enable-ftp --with-

curl=/usr/local/ --enable-memcache --enable-openssl
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐