Installing Solr in a XAMPP server in a LINUX server

血红的双手。 提交于 2019-12-14 00:26:13

问题


I try to install Solr PHP extension to my webserver. I already have an XAMPP server and I'm using PECL to install solr

$ cd /opt/lampp/bin

$ sudo ./pecl install solr-1.0.1

But I got the following error:

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

During the installation it prompts me to input a path:

libxml2 install prefix [/usr] :

I have tried with enter and the /usr/lib

What shall I input there to not get an error? Or how shall I install to not get an error?


Now I have libxml2 installed through yum install libxml2-devel. But I got some wierd errors now. Here are just a few of them, it ends with:

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

回答1:


If you're using RHEL/Fedora/CentOS/Scientific linux then you need to install libxml2-devel

 yum install libxml2-devel



回答2:


I could easily install PECL Solr via my systems package manager, probably this works for you as well. I found it very easy so probably worth to share (Fedora 14):

$ sudo yum install php-pecl-solr

A little later I got php-pecl-solr-0.9.11-1.fc14.x86_64 installed, the package's fedora homepage is here.


I could locate the libxml2 version with this command:

$ locate libxml2.so

probably this is helpful as well.




回答3:


Some useful links:

http://projects.mediashelf.us/projects/8/wiki/Setting_up_Fedora_and_Solr_for_use_with_ActiveFedora#Install-Solr

http://oxfordrepo.blogspot.com/2008/01/populating-search-engine-apache-solr.html



来源:https://stackoverflow.com/questions/6322165/installing-solr-in-a-xampp-server-in-a-linux-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!