Installing pecl_http in xubuntu

泪湿孤枕 提交于 2019-12-03 00:02:46

The message you are getting is not indicating that the PHP curl package is missing.

Instead, the problem is that you don't seem to have the "system" curl package -- or, at least, not in its "development" version, that contains the files required to compile pecl_http.

Judging from a quick apt-cache search :

$ LANG=en apt-cache search libcurl dev
libcurl4-gnutls-dev - Development files and documentation for libcurl (GnuTLS)
libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL)
...

You probably have to install either libcurl4-gnutls-dev or libcurl4-openssl-dev.
(The last time I compiled PHP, I installed the first one of those, and it allowed me to compile PHP with curl support enabled)

or.. just sudo apt-get install libcurl3-dev will provide curl/curl.h and your pecl_http installation will continue

Late but that solved my problem on Ubuntu 13.04:

sudo apt-get install -y curl libcurl3 libcurl4-gnutls-dev libmagic-dev then sudo pecl install pecl_http.

Credits: http://web.onassar.com/blog/2012/07/15/installing-pecl-http-package-on-ubuntu-11-10/

Kostanos

This is worked on my Ubuntu 12.10

sudo apt-get install libcurl3-openssl-dev
sudo pecl install -a pecl_http

sudo sh -c "echo 'extension=http.so' > /etc/php5/mods-available/http.ini"
sudo ln -s /etc/php5/mods-available/http.ini /etc/php5/conf.d/

You will need to restart your web server, to have this module loaded.

sudo service apache2 restart
or
sudo service nginx restart
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!