您的位置:首页 > 运维架构 > Linux

解决linux redhat版本下 yum命令不可使用问题。

2015-03-11 17:07 579 查看
[root@ashe back_data]# yum install perl

Loaded plugins: product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Nothing to do

问题如上,解决办法如下,

1、进入/etc/yum.repos.d/目录。

在命令行输入:wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

2、ls 一下,会看到一个文件名为CentOS-Base.repo的文件。

3、将原来的文件rhel-debuginfo.repo改名为rhel-debuginfo.repo.bak(备份一下原来的)

4、将CentOS-Base.repo改名为rhel-debuginfo.repo(把下载的文件改为原来的名字)

这时再运行yum install perl

OK。

[root@ashe sw]# yum install perl

Loaded plugins: product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

addons | 1.9 kB 00:00

addons/primary_db | 1.1 kB 00:00

base | 1.1 kB 00:00

base/primary | 1.3 MB 00:15

base 3667/3667

extras | 2.1 kB 00:00

extras/primary_db | 173 kB 00:00

update | 1.9 kB 00:00

update/primary_db | 302 kB

ok。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: