分页: 1 / 1

[求助]编译安装php5.2.0时出错。。

发表于 : 2006-11-23 20:46
deng
按这个教程 http://blog.yening.cn/2006/07/02/54.html
编译安装php5.2.0时出错。。
错误信息:

代码: 全选

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... /tmp/mysql.sock
checking for MySQL UNIX socket location... /tmp/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.
在网上找了一圈,也没解决。
我的mysql版本是mysql-max-5.0.27-linux-i686
mysql独立工作正常
请求大侠帮忙。。。

发表于 : 2006-12-24 17:02
jk88811
抱歉,不会,帮你顶一个吧

我按照MySQL 权威指南第三版里面来的。。。

发表于 : 2006-12-26 18:02
zxq803
我也碰到这个问题。
试试这样
./configure --with-prefix=/usr/local/php --with-mysql-dir=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs

即把--with-mysql换成--with-mysql-dir,我是这样通过的。

发表于 : 2006-12-26 18:08
zxq803
有人说编译PHP的时候应该用--with-mysql-dir参数 ..
尝试以后果然编译成功.
但是这样编译以后的PHP没有集成mysql的模块 .. 也就是不支持Mysql.

实在不行就只好换其它版本的php或mysql了。

发表于 : 2006-12-29 16:11
zxq803
我的mysql版本也是mysql-max-5.0.27-linux-i686
网上说是mysql版本不对,要用mysql-max-5.0.27-linux-i686-glibc23

但又不想重装mysq,因为开发部一直在使用中。

只要将下载的mysql解压到一个目录,我的是/root/software/mysql-max-5.0.27-linux-i686-glibc23/
编译安装php5.2.0时将参数:
--with-mysql=/usr/local/mysql
改为:
--with-mysql=/root/software/mysql-max-5.0.27-linux-i686-glibc23/

安将成功!