开发者

Installing Solr in a XAMPP server in a LINUX server

开发者 https://www.devze.com 2023-03-12 13:59 出处:网络
I try to install Solr PHP extension to my webserver. I already have an XAMPP server and I\'m using PECL to install solr

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


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

 yum install libxml2-devel


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消