Tuesday, December 27, 2005

YUM - Repository base is listed more than once

While checking what packages were available using the yum tool I kept getting the message:

Repository base is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository updates is listed more than once in the configuration

I couldn't find a great deal of help on the internet (hence this post!) but eventually it turned out that I had a .repo file which was listing the same repositories as my yum.conf file. The .repo file was in /etc/yum_repo.d/ directory, but yours might be called something else. So, check for a /etc/yum* directory and see if you find any .repo files. In my case they were identical so I used renamed the .repo file to .repo.hide and used yum.conf instead.

I hope this helps someone as I know I could have done with finding it 2 hours ago!

PS. Merry late Christmas.

4 comments:

Anonymous said...

Thank you for sparing my "2 hours" or more for me. Alain.

Anonymous said...

I installed another version of yum and it modified my yum.conf file. I decided to do the following:

make sure that your yum.conf file looks like this:
--------------------------------------------------------------------------------------------------------
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
--------------------------------------------------------------------------------------------------------
...if there is anything below this, comment it out with '#' like so...
#[base]
#name=Red Hat Linux $releasever - $basearch - Base
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/


#[updates]
#name=Red Hat Linux $releasever - Updates
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/


...this worked for me. Make sure it uses the files in /etc/yum.repos.d instead of the ones commented out.

Anonymous said...

thanks, it worked for me :)

Kristopher said...

Thank you, very helpful