我安装的是PHP5.2.6,因为Mysql5是用rpm方式安装的,都分散在各处,是不是只能--with-mysql ?因为mysql5在运行,所以不能重装:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql --with-curl=/usr/local/curl --enable-ftp --with-xml --with-expat-dir=/usr/lib --enable-sockets --enable-soap --with-gd=/usr/local/gd/ --with-jpeg-dir=/usr/local/jpeg6/ --with-zlib --with-png=/usr/local/lib/ --with-freetype-dir=/usr/local/freetype/
然后出错:
checking for LDAP Cyrus SASL support... no
checking whether to enable multibyte string support... no
checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql --with-curl=/usr/local/curl --enable-ftp --with-xml --with-expat-dir=/usr/lib --enable-sockets --enable-soap --with-gd=/usr/local/gd/ --with-jpeg-dir=/usr/local/jpeg6/ --with-zlib --with-png=/usr/local/lib/ --with-freetype-dir=/usr/local/freetype/
然后出错:
checking for LDAP Cyrus SASL support... no
checking whether to enable multibyte string support... no
checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
方法一:(比较呆板)
你可以把mysql运行用进程关了啊
方法二:找到mysql的包,不过也是用命令
在bin下有linux的运行文件和关闭文件
通过以上方法,把mysql关闭后,朋友你重新安装,最好再找个新的mysql——linux
这样你的问题就解决了
不行再试试 --with-mysql=/usr/include/mysql
应该没有差别把
实在嫌麻烦 就把别人源码安装好的 mysql 复制过来 (编译时加参数--with-mysql=/MYSQL的路径) 等PHP装完后再把mysql删了