I encountered this error installing Solr on a cPanel server using PECL, and thought I would post the solution, since I didn’t find it anywhere else.

Whether installing through WHM or on the command line I saw this error:

checking for cURL support... yes, shared
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
ERROR: `/root/tmp/pear/solr/configure --enable-solr-debug=no --with-curl=/usr --with-libxml-dir=/usr' failed
The solr.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626
Tidying /usr/local/lib/php.ini...

The solution was simple: install libcurl-devel with this command:

yum install -y libcurl-devel

Then PECL was able to install solr without error:

pecl install solr