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 “extension=http.so” to your php.ini file, and you should be good to go.
Latest posts by Thomas Hunter II (see all)
- Online Colorscheme Configurator for i3, i3status, dmenu - 2017-02-08
- A Holistic Approach to Microservices - 2016-12-27
- SF Node November 2016 – Node, Redis, and You! - 2016-11-09