百胜安装php-pecl-memcached – 找不到包(epel-release-6-8.noarch.rpm)

我相信我已经下载并更新了EPEL rpm,但是我不能安装php-pecl-memcached ..我对这个很陌生,任何帮助表示赞赏。

#rpm -Uvh epel-release-6-8.noarch.rpm warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] package epel-release-6-8.noarch is already installed # yum update Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.us.leaseweb.net * epel: mirror.symnds.com * extras: mirror.ash.fastserv.com * updates: mirror.vcu.edu Setting up Update Process No Packages marked for Update #yum install php-pecl-memcached Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.us.leaseweb.net * epel: mirror.symnds.com * extras: mirror.ash.fastserv.com * updates: mirror.vcu.edu Setting up Install Process No package php-pecl-memcached available. Error: Nothing to do 

yum.conf或其中包含的文件中,几乎肯定会错误地用yum的exclude选项排除一些包。 比如你可能有:

 exclude=php* 

这将防止任何名称以PHP开头的包被显示给您。

要解决这个问题,请从你的yumconfiguration中删除排除。

(这可能是作为错误地尝试版本lockingPHP包而使用yum versionlock插件来完成此操作。)

扩展@迈克尔汉普顿的答案 。 你也可以像这样debugging这个问题。

1.首先确认与OP相同的系统

 % uname -a Linux data01 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux % cat /etc/redhat-release CentOS release 6.3 (Final) 

2./etc/yum.conf没有exclude=php*时,显示yum cmds

 % repoquery *pecl* --location http://eq-centosrepo.hopto.org/6.3/os/x86_64/Packages/php-pecl-apc-3.1.9-2.el6.x86_64.rpm http://eq-centosrepo.hopto.org/6.3/os/x86_64/Packages/php-pecl-apc-devel-3.1.9-2.el6.x86_64.rpm http://eq-centosrepo.hopto.org/6.3/os/x86_64/Packages/php-pecl-memcache-3.0.5-4.el6.x86_64.rpm 

3.显示回购

 % yum repolist Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: yum.singlehop.com * extras: mirror.anl.gov * updates: mirrors.seas.harvard.edu repo id repo name status base CentOS-6 - Base 6,346 extras CentOS-6 - Extras 17 updates CentOS-6 - Updates 1,048 repolist: 7,411 

4.exclude=php*添加到/etc/yum.conf

 % vim /etc/yum.conf ... ... exclude=php* ... 

5.确认php *包被排除在外

 # with repoquery % repoquery *pecl* --location % # with yum % yum list all php-pecl* Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: yum.singlehop.com * extras: mirror.anl.gov * updates: mirrors.seas.harvard.edu Error: No matching Packages to list 

告诉yum使用--disableexcludes=all开关忽略排除

 % yum list all php-pecl* --disableexcludes=all Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: yum.singlehop.com * extras: mirror.anl.gov * updates: mirrors.seas.harvard.edu Available Packages php-pecl-apc.x86_64 3.1.9-2.el6 base php-pecl-apc-devel.x86_64 3.1.9-2.el6 base php-pecl-memcache.x86_64 3.0.5-4.el6 base 

首先,检查是否已安装软件包…

 # yum list installed php-pecl-memcached.x86_64 

要么

 # rpm -qi php-pecl-memcached 

这会给你一个系统当前状态的指示。 从这里开始,看起来你已经安装了这个软件,但是这两个命令可以帮你确认。

– 编辑 –

yum repolist输出显示EPEL存储库启用,以及Powerstack回购 。 这两个有类似的包。 在Powerstack,这可能是处理你的PHP和Apache,你需要:

yum install php-pecl-memcache

该软件包的名称与EPEL中的名称略有不同。 试试看