简体   繁体   English

在我的Ubuntu机器上找不到php_json.h

[英]Can't find php_json.h on my Ubuntu machine

I'm trying to install the solr module for PHP, which uses JSON to communicate between the web server and the solr server. 我正在尝试为PHP安装solr模块,该模块使用JSON在Web服务器和solr服务器之间进行通信。 While trying to compile solr, it cannot find the header ext/json/php_json.h and when I look, it isn't there. 尝试编译solr时,找不到标题ext / json / php_json.h,当我看时,它不存在。 The perplexing thing is that JSON has been included into the version of PHP that is installed on my server (5.2.10-2ubuntu6.7). 令人困惑的是,我的服务器上安装的PHP版本(5.2.10-2ubuntu6.7)中已经包含JSON。 When I run a php -me command, I see that json is included in the list of modules installed. 当我运行php -me命令时,我看到json包含在已安装的模块列表中。 Any idea what package is missing that I need to install to get the missing headers? 知道我需要安装哪些软件包才能获得缺少的标题吗?

I decided to make the appropriate directory /usr/include/php5/ext/json and copy the file from the PHP source tree. 我决定创建适当的目录/usr/include/php5/ext/json并从PHP源代码树中复制文件。 I got the file from http://svn.php.net/viewvc/php/php-src/tags/php_5_2_10/ext/json/php_json.h?revision=282308&view=markup . 我从http://svn.php.net/viewvc/php/php-src/tags/php_5_2_10/ext/json/php_json.h?revision=282308&view=markup获得了文件。 Turns out the module requires a newer version of json that what is installed on my server; 原来,该模块需要服务器上安装的json的较新版本; I'm testing a patch to the module that would work for this old of a PHP installation. 我正在测试该模块的修补程序,该修补程序将适用于较旧的PHP安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM