Monday 25 January 2016

RedHat 7 - Software failed to update

If you have issues with yum updating your OS or packages, with this error:
Error downloading packages:
  lsscsi-0.27-3.el7.x86_64: [Errno 256] No more mirrors to try.

Mount the DVD-ROM with the RedHat EL 7 source disk:
# mount /dev/cdrom /cdrom
Make sure your yum repo has this file: cdrom.repo:
[CDROM]
name=CDROM
baseurl=file:///cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Make sure you are joined to the RHN with a valid subscription:

And if you have this error: rhn_register fails with "ERROR: can not find RHNS CA file:/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT", fix this using the instructions here: https://access.redhat.com/solutions/26435?tour=6 correcting these lines in /etc/sysconfig/rhn/up2date:
serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
sslCACert=/usr/share/rhn/RHNS-CA-CERT