0
在我的linux服务器中,我从源代码安装了php v5.2.14,并且没有安装mysql和apache。由于此服务器仅用于运行phpunit,所以它不是安装mysql和apache的必备工具。这个问题是有些单元测试需要mysqli扩展。所以,我尝试使用php源代码中的代码安装mysqli扩展。然而,执行'./configure'时,它停止如下:在没有安装mysql服务器的情况下安装php mysqli扩展程序
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /home/pu/php
checking for PHP includes... -I/home/pu/php/include/php -I/home/pu/php/include/php/main -I/home/pu/php/include/php/TSRM -I/home/pu/php/include/php/Zend -I/home/pu/php/include/php/ext -I/home/pu/php/include/php/ext/date/lib
checking for PHP extension directory... /home/pu/php/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /home/pu/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for MySQLi support... yes, shared
checking whether to enable embedded MySQLi support... no
mysql_config not found
configure: error: Please reinstall the mysql distribution
所以我认为它可能缺少mysql导致此问题。 有没有解决方案。我不想安装mysql服务器,只需安装mysql客户端或驱动程序就足够了。
出于好奇,为什么选择5.2.14? 5.3分支现在被认为是旧的,5.4是最新的支持版本。 –