gpt4 book ai didi

php - pecl install pecl_http 没有可用的版本

转载 作者:可可西里 更新时间:2023-10-31 23:43:14 25 4
gpt4 key购买 nike

我正在尝试安装 pecl HTTPRequest 扩展。但是当我在我的 CentOS 服务器上运行以下命令时,我收到消息说没有可用的版本并且安装失败。

$pecl install pecl_http
No releases available for package "pecl.php.net/pecl_http"
install failed

我做错了什么?

编辑:Pecl 配置

    Configuration (channel pecl.php.net):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pecl.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pecl.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir /usr/local/bin
PEAR documentation directory doc_dir /usr/local/lib/php/doc
PHP extension directory ext_dir ./
PEAR directory php_dir /usr/local/lib/php
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR configuration file cfg_dir /usr/local/lib/php/cfg
directory
PEAR data directory data_dir /usr/local/lib/php/data
PEAR Installer download download_dir /tmp/pear/download
directory
PHP CLI/CGI binary php_bin /usr/local/bin/php
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir /tmp/pear/temp
PEAR test directory test_dir /usr/local/lib/php/test
PEAR www files directory www_dir /usr/local/lib/php/htdocs
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 22
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin /usr/bin/gpg
Signature Key Directory sig_keydir /usr/local/etc/pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename /home/onsboek/.pearrc
System Configuration File Filename /usr/local/etc/pear.conf

最佳答案

尝试以下操作;

yum install php-pear
yum install gcc
yum install curl-devel
/usr/bin/pecl install pecl_http

将以下行添加到/etc/php.ini 文件中: extension=http.so

重新启动您的 apache 服务器以便可以加载扩展:

httpd -k restart

如果它不起作用,请告诉我输出结果。

关于php - pecl install pecl_http 没有可用的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8367748/

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