以下为本篇文章全部内容:
编译PHP的过程中遇到下面这个错误,如果软件已经安装还是出现这个错误那么说明没有设置 PKG_CONFIG_PATH 环境变量,或者安装的软件没有把 pkg-config 添加到环境变量中。
configure: error: Package requirements (libxml-2.0 >= 2.9.0) were not met: No package 'libxml-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML_CFLAGS and LIBXML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
解决办法找到软件的安装路径
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/Cellar/libxml2/2.9.10_2/lib/pkgconfig"
然后再执行编译命令即可
总赞数量:18274
总踩数量:128087
文章数量:29