• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“Bad id for repo: My Repo, byte = 2” yum update error

by admin

The Problem

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

The 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
....

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Enable/Disable CPUs (Limiting CPU count) in CentOS / RHEL
  2. localectl: command not found
  3. TIME_WAIT queue troubles
  4. Manage ASM Audit Files with syslog – configure lograte and auditing
  5. How to Change runlevels/targets using systemd in Ubuntu
  6. List of SELinux Utilities
  7. mpg123: command not found
  8. blastn: command not found
  9. mailstat Command Examples in Linux
  10. nautilus Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright