gpt4 book ai didi

php - Ubuntu pecl 安装 pecl_http 失败

转载 作者:IT王子 更新时间:2023-10-29 00:16:47 25 4
gpt4 key购买 nike

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

  • libcurl3-openssl-dev
  • php-http
  • libpcre3-dev
  • libcurl3
  • php-梨
  • 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。

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

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

您需要将 extension = http.so 添加到您的 php.ini 文件中。但看起来您已经这样做了。

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

关于php - Ubuntu pecl 安装 pecl_http 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25892808/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com