Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在LINUX服务器的XAMPP服务器中安装Solr_Php_Linux_Solr_Xampp_Pecl - Fatal编程技术网

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

Php 在LINUX服务器的XAMPP服务器中安装Solr,php,linux,solr,xampp,pecl,Php,Linux,Solr,Xampp,Pecl,我尝试将SolrPHP扩展安装到我的Web服务器上。我已经有了一个XAMPP服务器,我正在使用PECL安装solr $cd/opt/lampp/bin $sudo./pecl安装solr-1.0.1 但我得到了以下错误: checking libxml2 install dir... /usr/lib checking for xml2-config path... configure: error: xml2-config not found. Please check your libxml

我尝试将SolrPHP扩展安装到我的Web服务器上。我已经有了一个XAMPP服务器,我正在使用PECL安装solr

$cd/opt/lampp/bin

$sudo./pecl安装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安装前缀[/usr]:

我试过使用
enter
/usr/lib

我应该在那里输入什么以避免出错?或者我应该如何安装才能不出错



现在我已经通过
yum安装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
我可以通过我的系统包管理器轻松安装,这可能也适用于您。我发现这很容易,所以可能值得分享(Fedora 14):

过了一会儿,我安装了
php-pecl-solr-0.9.11-1.fc14.x86_64


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

$ locate libxml2.so

这可能也很有帮助。

如果您使用的是RHEL/Fedora/CentOS/Scientific linux,那么您需要安装libxml2-devel

 yum install libxml2-devel
一些有用的链接:


我认为这个问题是针对serverfault.com(或者可能)的,这是一个关于安装PHP PECL扩展的问题,它不是一个具体的unix配置问题。关于安装开发工具和LIB的问题,请参见本主题。谢谢。您安装了libxml2吗?它安装在哪里?你有配置吗?;您使用的是哪个系统,可能可以通过系统包管理器进行安装?如果没有,为什么不呢?现在我已经通过
yum安装libxml2-devel
安装了libxml2。但我现在犯了一些严重的错误?当它尝试安装solr PHP扩展时,到处都有错误。顺便说一句,我使用的是Amazon免费层,所以我使用的是他们的linux版本。它的结尾是:\n没有这样的参数/tmp/pear/temp/solr/solr\u类型。h:388:错误:声明参数'client\u count',但没有这样的参数/tmp/pear/temp/solr/solr\u类型。h:386:错误:声明参数'document\u count',但没有这样的参数/tmp/pear/temp/solr/solr\u类型。h:384:错误:声明参数'request\u count',但没有这样的参数/tmp/pear/temp/solr/php_solr.c:1185:错误:在输入make结束时应为“{”。**[php_solr.lo]错误1错误:'make'失败我尝试了这个,它安装了libxml2。但是我遇到了一些新错误。检查上面的问题,它只是说没有可用的软件包。请告诉您的操作系统和版本。看起来您至少有可用的yum,可能很容易添加缺少的存储库。我使用的是免费的Amazon层,所以我使用的是他们的linux版本。
 yum install libxml2-devel