Yum 安装 php-pecl-memcached - 未找到包(有 epel-release-6-8.noarch.rpm)

Yum 安装 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

答案1

您几乎肯定错误地使用 yumexclude选项排除了您安装的某些软件包yum.conf或它所包含的某个文件。例如,您可能有:

exclude=php*

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

要修复此问题,请从 yum 配置中删除排除。

(这可能是为了对 PHP 包进行版本锁定而做出的错误尝试。使用 yum versionlock 插件来实现这一点。)

答案2

扩展@Michael Hamptons 回答。您也可以像这样调试该问题。

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.yum当不存在时exclude=php*显示命令/etc/yum.conf

% 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

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

% 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

答案3

首先,检查您是否已经安装了该软件包...

# yum list installed php-pecl-memcached.x86_64

或者

# rpm -qi php-pecl-memcached

这将向您显示系统的当前状态。从这里看来,您似乎已经安装了它……但这两个命令将帮助您进行确认。

- 编辑 -

输出yum repolist显示电力供应处已启用存储库,以及Powerstack 仓库。这两个有类似的包。在可能处理您的 PHP 和 Apache 的 Powerstack 中,您需要:

yum install php-pecl-memcache

该软件包的名称与 EPEL 中的名称略有不同。请尝试一下。

相关内容