我在重装php,#make时,最后有如下提示:
........
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o)(.text+0xb4): In function `my_com
press_alloc':
: undefined reference to `compress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o)(.text+0x12a): In function `my_un
compress':
: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@~ php-4.3.4]#
请问是什么原因啊,继续make install会成功吗?
[quote:0ba9bd5ab2="streamer"]我在重装php,#make时,最后有如下提示:
........
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o)(.text+0xb4): In function `my_com
press_alloc':
: undefined reference to `compress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o)(.text+0x12a): In function `my_un
compress':
: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@~ php-4.3.4]#
请问是什么原因啊,继续make install会成功吗?[/quote]
If you compile in MySQL support -- and most people do -- MySQL's client
library (also a dynamically linked library) requires the functionality
of ZLIB.
To fix the problem, all you have to do, right before you run
PHP's "make", is
to edit your top-level Makefile and modify the following line:
经过网上的一番搜索和查看安装文档,终于搞定MySQL+Apache+PHP的安装和配制乐:)
我把一些问题的原因和解决过程趁热打铁在这里说一下,或许对后学者有点滴的帮助。
之前我在浏览器中不能打开http://My_IP/xxx.html,是因为我的rh9自带安装了httpd.在
/etc/httpd/conf/httpd.conf中把DocumentRootym设置为/var/www的原故;而我一直以为重装
了apache后,是/usr/local/apache/conf/httpd.conf起作用 (这里面默认的html文件主目录是/usr/local/apache/htdocs)。
编译php时出错,提示 undefined reference to `uncompress',从网上查的资料说php在apache环境下动态模式安装时,需要装zlib;而我机子上已经装了zlib包,决定下个最新版本的试试,结果还是无效,网上我也直接找不到动态安装有相同错误的文章。
这时有点泄气的说,可还是有鼓想拼到底的冲动@!@ 于是我就重归本本,慢慢地翻找自带的INSTALL,README等相关帮助文档.......
.......
.......
我在php的INSTALL文档中找到:
"Some nots:
2: If you are recompiling PHP to add new extensions or upgrading
something like GD, remove the config.cache file before you re-run
configure.
我是属于recompile的,所以当然要守这一规则喽(这个一不小心给漏过就惨乐)!于是我重来,#make 居然顺利通过了,哇~~~真的好高兴,也顿时充满了信心:)
下面在配置的过程中虽也有遇到小波折,但相行之下已是波澜不惊乐,都顺势而解了。
再次感谢曾经提供帮助的朋友,不论是bbs上,网上,或是这里论坛,无名的或是有名的。
好像有点长舌,那就话不多说乐,也祝各位好运:)