努力在Centos上安装PHP pecl [英] struggling to install PHP pecl on Centos
问题描述
我正在尝试在CentOS服务器上安装php_http
PHP扩展.
I'm trying to install the php_http
PHP extension on my CentOS server.
我已经完成:
yum install php-pear
但是得到:
No package php-pear available
但是我可以做到:
pear
并从Pear获取命令列表.
And get a list of commands from Pear.
与yum install pecl
相同.我可以做pecl
,但是pecl install pecl_http
返回:
Same for yum install pecl
. I can do pecl
but pecl install pecl_http
returns:
No releases available for package "pecl.php.net/pecl_http"
install failed
但/usr/bin/pecl
尚不存在.另外,sudo pecl install pecl_http
返回sudo: pecl: command not found
,我觉得很奇怪.
Yet /usr/bin/pecl
isn't a directory that exists. Also a sudo pecl install pecl_http
returns sudo: pecl: command not found
, which I find quite odd.
我不太确定这是怎么回事/我在做什么错.
I'm not entirely sure what's going on here/what I'm doing wrong.
我正在使用以下存储库:
edit: I am using the following repos:
base CentOS-6 - Base
epel Extra Packages for Enterprise Linux 6 - x86_64
extras CentOS-6 - Extras
rpmforge RHEL 6 - RPMforge.net - dag
updates CentOS-6 - Updates
vz-base vz-base
vz-updates vz-updates
推荐答案
步骤1)导入REMI存储库
Step 1) import the REMI repo
CentOS 5
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm;
CentOS 6
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm;
第2步)安装php-pear
Step 2) install php-pear
yum --enablerepo=remi,remi-php55 install php-pear
第3步)安装pecl_http
Step 3) install pecl_http
pecl install pecl_http
这篇关于努力在Centos上安装PHP pecl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!