php5.6编译安装关于mysql的报错

来源:互联网 发布:北山狼淘宝 编辑:程序博客网 时间:2024/04/29 16:01


因为现在php7还是测试版,我是下载的php5.6最后一个稳定版:

先新建一个/usr/local/php5的目录,

如果mysql是编译安装在  /usr/local/mysql下那么,命令是

./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-session --with-mcrypt --with-curl


现在遇到一个问题,mysql是系统已经安装好了的,我现在只想升级php,所以修改了mysql的配置项,却每次都报错

configure: error: Cannot find MySQL header files under /usr/***我换了好几个mysql的位置都不行***

Note that the MySQL client library is not bundled anymore!


首先确定你本地已经安装了mysql和mysql-devel,查看命令如下:

rpm -qa | grep -i mysql


如果都已经安装了mysql的,现在解决办法如下:

那么就明确了  --with-mysql=/usr,configure命令就OK了,然后愉快的make和make install。


0 0
原创粉丝点击