linux安装yum报错无法获得锁,yum安装报错

我的系统是centos 6.8 x86

安装bind时出错如下:

[root@Ams ~]# yum install bind -y

Loaded plugins: fastestmirror, refresh-packagekit, security

Setting up Install Process

Loading mirror speeds from cached hostfile

* base: ftp.sjtu.edu.cn

* extras: ftp.sjtu.edu.cn

* updates: ftp.sjtu.edu.cn

file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml

Trying other mirror.

base                                                                                                                         | 3.7 kB     00:00

epel                                                                                                                         | 4.3 kB     00:00

extras                                                                                                                       | 3.4 kB     00:00

updates                                                                                                                      | 3.4 kB     00:00

Resolving Dependencies

–> Running transaction check

—> Package bind.x86_64 32:9.8.2-0.47.rc1.el6 will be installed

–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================

Package                       Arch                            Version                                         Repository                      Size

====================================================================================================================================================

Installing:

bind                          x86_64                          32:9.8.2-0.47.rc1.el6                           Local                          4.0 M

Transaction Summary

====================================================================================================================================================

Install       1 Package(s)

Total download size: 4.0 M

Installed size: 7.3 M

Downloading Packages:

Error Downloading Packages:

32:bind-9.8.2-0.47.rc1.el6.x86_64: failure: Packages/bind-9.8.2-0.47.rc1.el6.x86_64.rpm from Local: [Errno 256] No more mirrors to try.

解决方案:

就是把本地源关闭

将/etc/yum.repos.d/CentOS-Media.repo里面的enabled=1改成enabled=0即可

现在可以安装了。

原创文章,作者:mississippi,如若转载,请注明出处:http://www.178linux.com/27073

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值