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

软件和网站开发以及相关技术探讨
回复
头像
deng
帖子: 130
注册时间: 2006-04-09 14:09
来自: 北京
联系:

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

#1

帖子 deng » 2006-11-23 20:46

按这个教程 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独立工作正常
请求大侠帮忙。。。
Programming is fun
==========================
http://oteam.cn
图片
jk88811
帖子: 55
注册时间: 2006-02-16 9:42

#2

帖子 jk88811 » 2006-12-24 17:02

抱歉,不会,帮你顶一个吧

我按照MySQL 权威指南第三版里面来的。。。
zxq803
帖子: 3
注册时间: 2006-12-21 14:48

#3

帖子 zxq803 » 2006-12-26 18:02

我也碰到这个问题。
试试这样
./configure --with-prefix=/usr/local/php --with-mysql-dir=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs

即把--with-mysql换成--with-mysql-dir,我是这样通过的。
zxq803
帖子: 3
注册时间: 2006-12-21 14:48

#4

帖子 zxq803 » 2006-12-26 18:08

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

实在不行就只好换其它版本的php或mysql了。
zxq803
帖子: 3
注册时间: 2006-12-21 14:48

#5

帖子 zxq803 » 2006-12-29 16:11

我的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/

安将成功!
回复