0

我有 phpfarm 编译 php 5.4.21 没有错误。但是当我尝试通过添加 custom-options-5.4.21.sh 来添加对 mysql 的支持时:

configoptions="--with-mysql=/usr/"

我最终以失败的编译结尾:

-L/usr//lib/x86_64-linux-gnu -lcrypt -lresolv -lcrypt -lrt -lmysqlclient -lrt -lm -ldl -lnsl -lxml2 -lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lcrypt    -Wl,--rpath -Wl,/usr//lib/x86_64-linux-gnu
/usr/bin/ld: ext/standard/image.o: undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line

看起来 phpfarm 正在从链接库中删除 -lz,但错误来自 libz.so.1,这是否意味着它正在使用 zlib 库?

4

2 回答 2

0

想我想通了。在安装 libmysqlclient-dev 之前,我已经运行了 phpfarm 的 compile.sh。在我发现要安装的帖子中,该帖子说要运行 make clean。我只是假设 phpfarm 做到了。事实证明,它在那个 scipt 中,但被注释掉了。进入 php 源目录并运行 make clean ,现在可以正常编译了。

于 2014-08-04T04:21:35.373 回答
0

我通过在配置命令的末尾包含 --with-zlib 摆脱了这个错误。这是我所做的:

./configure --with-mysql --with-libdir=/lib/x86_64-linux-gnu/ --with-zlib

于 2017-05-26T09:01:40.373 回答