問題: [ 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 解決上述問題