我尝试将 Solr PHP 扩展安装到我的网络服务器。我已经有一个 XAMPP 服务器,我正在使用 PECL 安装 solr
$ cd /opt/lampp/bin
$ sudo ./pecl install solr-1.0.1
但我收到以下错误:
checking libxml2 install dir... /usr/lib
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=
/usr --with-libxml-dir=/usr/lib' failed
在安装过程中,它提示我输入路径:
libxml2 install prefix [/usr] :
我已经尝试enter
过/usr/lib
我应该在那里输入什么才不会出错?或者我应该如何安装才不会出错?
现在我通过yum install libxml2-devel
. 但我现在遇到了一些奇怪的错误。这里只是其中的几个,它的结尾是:
no such parameter
/tmp/pear/temp/solr/solr_types.h:388: error: declaration for parameter 'client_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:386: error: declaration for parameter 'document_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:384: error: declaration for parameter 'request_count' but no such parameter
/tmp/pear/temp/solr/php_solr.c:1185: error: expected '{' at end of input
make: *** [php_solr.lo] Error 1 ERROR: `make' failed