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)
- Upgrading from an XPS 13 (9350) to a Carbon X1 5th Gen - 2017-10-03
- What have I been up to? Late 2017 Edition - 2017-09-28
- Is it time to replace REST with RPC? - 2017-09-27