无法安装php solr extension

时间:2016-09-06 05:09:10

标签: php solr

使用pecl install -n solr给出 No releases available for package "pecl.php.net/solr" install failed

还尝试了pear install pecl/solr,它提供了相同的输出: No releases available for package "pecl.php.net/solr" install failed

我正在使用Mac和php56。

pecl -V的输出 PEAR Version: 1.9.4 PHP Version: 5.6.25 Zend Engine Version: 2.6.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

另一个重要信息是,pearpecl在我的系统中不可用,所以我使用

安装它们

sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin

更新

尝试sudo pecl install -n solr,现在似乎更进了一步

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: phpize failed

1 个答案:

答案 0 :(得分:0)

幸运的是偶然发现了

PEAR package install fails

导致执行 pear list-upgrades在缓存目录中显示某种权限问题,在指定位置sudo使用/private/tmp/pear/cache手动创建目录

然后使用sudo将solr扩展名安装为sudo pecl install -n solr,这会引发以下错误:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

brew install autoconf后跟sudo pecl install solr工作。