微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php – Ubuntu pecl安装pecl_http失败

我正在尝试安装此扩展,但在配置阶段失败.我在ubuntu 12.04,我刚刚安装了这些软件包:

> libcurl3-openssl-dev
> PHP-http
> libpcre3-dev
> libcurl3
>梨梨
> PHP5-dev

PHP版本:

PHP 5.3.10-1ubuntu3.14 with Suhosin-Patch (cli) (built: Sep  4 2014 07:08:49) 
copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0,copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0,copyright (c) 2002-2010,by Derick Rethans

以下是安装命令的日志:

sudo pecl install pecl_http
downloading pecl_http-2.1.1.tgz ...
Starting to download pecl_http-2.1.1.tgz (158,441 bytes)
.................................done: 158,441 bytes
64 source files,building
running: PHPize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Enable extended HTTP support [yes] : 
where to find zlib [/usr] : 
where to find libcurl [/usr] : 
where to find libevent [/usr] : 
building in /tmp/pear/temp/pear-build-rootqE2kgU/pecl_http-2.1.1
running: /tmp/pear/temp/pecl_http/configure --with-http --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/home/gare88/Lib/PHP/libevent-2.0.21-stable/
checking for grep that handles long lines and -e... /bin/grep

[... cut...]

checking for zlib.h... found in /usr
checking for zlib version >= 1.2.0.4... 1.2.3.4
checking for curl/curl.h... found in /usr
checking for curl-config... found: /usr/bin/curl-config
checking for curl version >= 7.18.2... 7.22.0
checking for SSL support in libcurl... yes
checking for openssl support in libcurl... no
checking for gnutls support in libcurl... no
checking for ares support in libcurl... no
checking for bundled SSL CA info... /etc/ssl/certs/ca-certificates.crt
checking for event2/event.h... not found
configure: WARNING: continuing without libevent support
checking for ext/raphf support... no
configure: error: Please install pecl/raphf and activate extension=raphf.so in your PHP.ini
ERROR: `/tmp/pear/temp/pecl_http/configure --with-http --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr' Failed

这似乎是pecl / raphf的一个问题,所以我试过:

sudo pecl install raphf
pecl/raphf is already installed and is the same as the released version 1.0.4
install Failed

位于/etc/PHP5/apache2/PHP.ini上的PHP.ini文件末尾
添加了一行:

extension=raphf.so
extension=propro.so
extension=http.so

还有什么我可以试试吗?

您需要从包管理器安装PHP-raphf.

对我来说,我使用以下方式安装了模块.在你的情况下,你应该能够为apt-get切换yum.

sudo yum install PHP-raphf
sudo yum install PHP-propro
sudo pecl install pecl_http

您将需要将extension = http.so添加到您的PHP.ini文件.但是看起来你已经做到了这一点.

pecl实际上并不安装您要查找的.so文件.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐