转自: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服务器即可。
"
$ sudo apt-get install php5-dev php-pear