php安装http扩展(sudo apt-get install)

转自:http://www.xwuxin.com/?p=1575点击打开链接

"

上面新需求准备采用kohana,kohana是很早之前从ci分出来的一个框架,轻量,没有像ci那样去兼容php4。kohana需要安装http扩展,在Ubuntu上折腾了下,遇到些问题记录在此:
在安装好pecl的前提下:

sudo apt-get install libcurl3-openssl-dev
sudo apt-get install libmagic-dev

如果你不安装libcurl3-openssl-dev,直接用pecl install pecl-http方式安装http扩展,它会给你报以下error:

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=1 –with-http-magic-mime=no –with-http-shared-deps’ failed

configure: error: could not find magic.h
ERROR: `/tmp/pear/temp/pecl_http/configure –with-http-curl-requests –with-http-zlib-compression –with-http-magic-mime –with-http-shared-deps’ failed

接着安装http扩展:

sudo pecl install pecl_http

一路回车之后,完成安装。
打开php.ini,加上extension=http.so,重启你的web服务器即可。


"


注:安装pecl:
$ sudo apt-get install php5-dev php-pear


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值