在LINUX服务器的XAMPP服务器中安装Solr

时间:2011-06-12 13:19:49

标签: php linux solr xampp pecl

我尝试将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安装了libxml2。但是我现在遇到了一些奇怪的错误。以下是其中的一部分,结尾于:

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

3 个答案:

答案 0 :(得分:2)

如果你正在使用RHEL / Fedora / CentOS / Scientific linux,那么你需要安装libxml2-devel

 yum install libxml2-devel

答案 1 :(得分:1)

我可以通过我的系统软件包管理器轻松安装PECL Solr,这可能也适用于您。我觉得很容易分享(Fedora 14):

$ sudo yum install php-pecl-solr

过了一会儿,我安装了php-pecl-solr-0.9.11-1.fc14.x86_64the package's fedora homepage is here


我可以使用以下命令找到libxml2版本:

$ locate libxml2.so

可能这也很有用。

答案 2 :(得分:1)