在xubuntu中安装pecl_http [英] Installing pecl_http in xubuntu

查看:85
本文介绍了在xubuntu中安装pecl_http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照标题,我只是想在ubuntu中为php安装pecl_http扩展名.

As per title, I am simply trying to install pecl_http extension for php in ubuntu.

所以我做了最有意义的事情:

So I did what makes most sense:

andreas@earl ~ $ sudo pecl install pecl_http
downloading pecl_http-1.6.6.tgz ...
Starting to download pecl_http-1.6.6.tgz (173,645 bytes)
.....................................done: 173,645 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
 1. whether to enable cURL HTTP requests; specify libcurl directory : yes

1-1, 'all', 'abort', or Enter to continue: 
 1. whether to enable support for gzencoded/deflated message bodies; specify zlib directory : yes

1-1, 'all', 'abort', or Enter to continue: 
 1. whether to enable response content type guessing; specify libmagic directory : no

1-1, 'all', 'abort', or Enter to continue: 
 1. whether to depend on extensions which have been built shared : yes

1-1, 'all', 'abort', or Enter to continue: 
building in /var/tmp/pear-build-root/pecl_http-1.6.6
running: /tmp/pear/temp/pecl_http/configure --with-http-curl-requests --with-http-zlib-compression --with-http-magic-mime=no --with-http-shared-deps

checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc

.... <snip>

checking for unistd.h... (cached) yes
checking for gethostname... yes
checking for getdomainname... yes
checking for getservbyport... yes
checking for getservbyname... yes
checking for zlib.h... found in /usr
checking for zlib version >= 1.2.0.4... 1.2.3.3
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

好吧,我的系统中没有卷曲,所以我有

so Ok, I don't have curl in the system, so I do

andreas@earl ~ $ sudo apt-get install php5-curl

Curl安装得很好,所以我尝试再次安装php5-http,但仍然是相同的错误.

Curl installed fine, so I tried installing php5-http again, but still the same error.

任何人都可以共享一盏灯吗? :(

Anyone could share a light please? :(

-aw

推荐答案

您收到的消息并不表示缺少PHP curl软件包.

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

相反,问题是您似乎没有系统" curl软件包-或至少没有它的开发"版本,其中没有包含编译pecl_http所需的文件.

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.

从快速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)
...

您可能必须安装libcurl4-gnutls-devlibcurl4-openssl-dev.
(上一次我编译PHP时,我安装了其中的第一个,并允许我在启用curl支持的情况下编译PHP)

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)

这篇关于在xubuntu中安装pecl_http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆