Trying to install pecl Solr extension but it needs curl

When I try to install solr-beta:

pecl install solr-beta

I get this error:

pecl/solr requires PHP extension "curl" No valid packages found install failed

The thing is curl is already installed and it seems to be enable when I look at my phpinfo page.


Solution 1:

From what is mentioned in http://pecl.php.net/bugs/bug.php?id=17012&edit=1, pecl does not recognize php modules that were not statically compiled into php. So if you are using any shared libraries, pecl will ignore them.

Pecl also ignores your php.ini.

The good news is there are still two easy ways to install this if you have curl as a shared extension:

1) pear install pecl/solr

2) pecl install -n solr

That should install solr php module. You will have to include the solr.so library by modifying the php.ini file.