Posted by & filed under Linux, PHP, Web Server.

I was recently tasked with getting the pecl_http package installed on a server. I already hade PECL all setup (which can be its own nightmare), and I had cURL installed. But, there is a mystery package which needed to be installed first.

tlhunter@amalthea:~ $ sudo pecl install pecl_http
downloading pecl_http-1.7.4.tgz ...
Starting to download pecl_http-1.7.4.tgz (174,503 bytes)
.........done: 174,503 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
whether to enable cURL HTTP requests; specify libcurl directory [yes] :

checking for curl/curl.h... not found
configure: error: could not find curl/curl.h
ERROR: `/tmp/pear/temp/pecl_http/configure --with-http-curl-requests --with-http-zlib-compression --with-http-magic-mime=no --with-http-shared-deps' failed

To fix this error, issue the following command, which will install the cURL headers required by pecl_http:

sudo apt-get install libcurl4-openssl-dev

Then, try to install pecl_http again:

sudo pecl install pecl_http

Once that is done, add “” to your php.ini file, and you should be good to go.

Thomas Hunter II

Thomas is passionate about technology and building products. A web design business created while attending college slowly evolved into a brick and mortar on Main St. of his small Midwestern hometown. His desire for fame and fortune led to the co-founding of a Y Combinator startup and a life in California.


Hey there! I'm currently writing a book on Microservices which I expect to release in early 2017. If you're interested in getting updates please signup here. More info about the Book