Error
While executing yum commands user is getting below error:
# yum update Bad id for repo: My Repo, byte = 2
The following is the repo file which is used for local dvd image
# cat /etc/yum.repos.d/my_repo.repo [My Repo] name=repo1 baseurl=file:///mnt/iso/ enabled=1 gpgcheck=0
Solution
[My Repo] is wrong as it uses spaces between letters which are not properly translated by yum. Do not include white space in [My Repo].
So to correct it change the name file from :
# cat /etc/yum.repos.d/my_repo.repo [My Repo] name=repo1 baseurl=file:///mnt/iso/ enabled=1 gpgcheck=0
To
# cat /etc/yum.repos.d/my_repo.repo [My-Repo] name=repo1 baseurl=file:///mnt/iso/ enabled=1 gpgcheck=0
Verify
Verify the
# yum update Failed to set locale, defaulting to C Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: ftp.nluug.nl * extras: mirror.i3d.net * updates: mirror.ams1.nl.leaseweb.net base | 3.6 kB 00:00:00 My-Repo | 951 B 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 updates/7/x86_64/primary_db | 6.0 MB 00:00:01