centos yum源配置问题解决办法

来源:互联网 发布:c语言指针视频教程 编辑:程序博客网 时间:2024/06/06 17:05
问题:
[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 解决上述问题



0 0
原创粉丝点击