我己照住
http://linux.vbird.org/linu...0apache.php的tarball方法去安装lamp 一直也没有问题除了安装mysql 后看不到
[root@test mysql]# netstat -tl | grep mysql
tcp 0 0 *:mysql *:* LISTEN
但很奇怪照样可以用/usr/local/mysql/bin/mysql -u root -p 入到mysql
我没有理会, 继续做下面的步骤去安装apache ,也很正常
直至到编译php 时就发生错误
我compile 时打了以下option
./configure --prefix=/usr/local/php4 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php4
编译也可以,但在最尾时就发生以下错误信息
checking for mysql_close in -lmysqlclient... no
checking for mysql_errno in -lmysqlclient... no
configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.
[root@Server php-4.4.2]#
当然也不能打make 和make install 啦~~
我也看过config.log 最后几行
int main() {
mysql_close()
; return 0; }
configure:63006: checking for mysql_errno in -lmysqlclient
configure:63025: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/mysql/lib -L/usr$
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure: failed program was:
#line 63014 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_errno();
int main() {
mysql_errno()
; return 0; }
究竟发生了什么事,是不是mysql 不能正常在netstat 显示确导致??又怎样解决呢?我试过不加with-mysql 的option,发现就正常编译, 但是试过faile to connect mysql server 什么MySQL Server Error:
Client does not support authentication protocol requested by server; consider upgrading MySQL client ( 1251 )
netstat -tl 的结果是
[root@Server php-4.4.2]# netstat -tl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:3306 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:www *:* LISTEN
[root@Server php-4.4.2]#
而ps -aux | grep mysql 却看到那4行
呜~~我真的有照着做啊~~做了两日都自己解决不了,所以来求各位大大帮忙啊~有什么要看的我也会以最快速度post 上来.......
(p.s. 我用的是tubrolinux 7.0)