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

标签 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 安装前缀 [/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

最佳答案

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

 yum install libxml2-devel

关于php - 在 LINUX 服务器中的 XAMPP 服务器中安装 Solr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6322165/

相关文章:

linux - 套接字绑定(bind)在一个端口上,但 netstat 和 lsof 等工具显示它在其他端口上监听

linux - Bash 'here document' 字/定界符未加引号

search - SOLR查询参数避免同厂家泛洪

search - Solr Ping 查询导致异常 : undefined field text

git - 通过 aws.push 部署到 Elastic Beanstalk 时保留某些现有文件

javascript - 分离 PHP 和 Javascript 代码的最佳方法

php - mysqli_fetch_assoc() 不返回任何东西

php - SaaS 的身份验证

php - 多个 wordpress 可以从一个数据库中获取信息吗?

linux - 有时串口读取给出转换后的值[垃圾值]