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

centos yum源配置问题解决办法

2016-03-08 10:30 417 查看
问题:

[root@hadoop yum.repos.d]# mount -t auto /dev/cdrom /mnt/cdrom

mount: you must specify the filesystem type

解决办法:
mount -o loop /dev/cdrom /mnt/cdrom/

问题:

Could not open/read file:///mnt/cdrom/Packages/repodata/repomd.xml

有问题的本地yum源配置:

[root@hadoop yum.repos.d]# cat CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. 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=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]

[local]
name=CentOS-local
baseurl=file:///mnt/cdrom/Packages
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

解决办法:

将上面红色的baseurl替换为:baseurl=file:///mnt/cdrom 解决上述问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: