4

Why is my yum no longer working? It was previously working fine. But seems to have inexplicably stopped working. FYI, I'm running this on Centos system that is running in VirtualBox on my MacBook Pro.

% sudo yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                          |  13 kB     00:00
 * base: mirror.net.cen.ct.gov
 * c6-media:
 * epel: mirrors.ucr.ac.cr
 * extras: mirrors.bluehost.com
 * rpmforge: www.mirrorservice.org
 * updates: mirrors.bluehost.com
file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file://    /media/CentOS/repodata/repomd.xml
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file://    /media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file://    /media/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its     path and try again    
  • 2
    Is the CentOS DVD mounted? You could also try running yum --disablerepo='*media*' update – Cristian Ciupitu Jun 14 '14 at 19:17
  • CentOS DVD is unmounted. So that worked. Thanks. Then I tried to install my packages: sudo yum --disablerepo='media' install rpmforge dkms. It can't find rpmforge. How do I point it to the correct repo on the internet that has that package? – Saqib Ali Jun 14 '14 at 23:03
  • 1
    Read Installing RPMforge. – Cristian Ciupitu Jun 14 '14 at 23:51
3

The CentOS DVD is probably not mounted, so you either mount it so that the media repository works, or you stop using that repository. To disable the repository when updating run:

yum --disablerepo='*media*' update

To disable the repository permanently edit /etc/yum.repos.d/*media*.repo and set enabled to 0. For example you could use this command:

sed --in-place -r 's/^\s*enabled\s*=.*$/enabled=0/' /etc/yum.repos.d/*.repo
0

If you are using linux (RHEL 6.4) under vmware and you enabled your shared folder option

If Packages is under your share directory.

Create a soft link of your Packages directory under /opt

ln -s  /mnt/hgfs/rpm/packages /opt/packages
createrepo  -v /opt/packages
yum clean all
yum update

Done.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.