+ -
当前位置:首页 → 问答吧 → centos配置本地yum源不起作用

centos配置本地yum源不起作用

时间:2011-07-02

来源:互联网

我的环境是虚拟机里装centos release 5.5
我把镜像挂在到/mnt/cdrom/       mount /dev/cdrom /mnt/cdrom  成功!
修改/etc/yum.repso.d/CentOS-Media.repo :
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
#  CentOS-5.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c5-media [command]
#  
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c5-media [command]

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt/cdrom/
#        file:///media/cdrom/
#        file:///media/cdrecorder/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
保存退出。
使用命令yum --disablerepo=/* --enablerepo=c5-media install curl-devel 不能成功,我检查过,镜像里有这个软件包

作者: ms_明   发布时间: 2011-07-02

好了,重启之后好了,郁闷

作者: ms_明   发布时间: 2011-07-02

不用重启
首先
yum clean all
然后
yum update
就可以了

作者: onlyshenmin   发布时间: 2011-07-02

呵呵~板凳犀利啊~

作者: dn833   发布时间: 2011-07-03

相关阅读 更多