Yum returns 'InstallMedia': Error parsing config: Error parsing "baseurl = 'file///media/RHEL-6.9 Server.x86_64'": URL must be http, ftp, file or https not ""

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5.x
  • Red Hat Enterprise Linux 6.x
  • Red Hat Enterprise Linux 7.x

Issue

  • The local yum repository created using installation media returns following error when any yum command is run:
'InstallMedia': Error parsing config: Error parsing "baseurl = 'file///media/RHEL-6.9 Server.x86_64'": URL must be http, ftp, file or https not ""

Resolution

  • : (colon) is missing in baseurl

Root Cause

  • Caused by missed ":" in the baseurl
# cat /etc/yum.repos.d/local.repo 
[InstallMedia]
name=Red Hat Enterprise Linux 6.9
baseurl=file///media/RHEL-6.9\ Server.x86_64                <-----<< : is missing 
mediaid=1489025761.767832
metadata_expire=-1
gpgcheck=0
cost=500
  • Component
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments