Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I try to use Yum (e.g. # yum update) I get an error and it prevents me from using Yum. Any help on this would be really cool!

This is the error that I get when I try to run a Yum command:

# yum update
Setting up Update Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

Here is the content of the CentOS-Base.repo file:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=1

#released updates 
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=1 

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=0 

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=0 

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=0 

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
protect=0

Thanks in Advance! Max Kulik

share|improve this question
2  
Can you share your /etc/yum.repo.d/* contents? It looks like you've got a typo in one of your .repo files or in your /etc/yum.conf file. –  slm Jul 10 '13 at 22:23
1  
@slm: He damaged his configuration during an earlier escapade. –  Ignacio Vazquez-Abrams Jul 10 '13 at 22:24
    
@IgnacioVazquez-Abrams - thanks for saving me wasting my time on this. Do a re-install, would be my advice now. There isn't any value in us helping here, looks like your installation is corrupt. –  slm Jul 10 '13 at 22:29
    
@slm: This is a brand new install of CentOS and this is the 3rd time I have done a re-install I can guarantee that this is not a corrupt install. I will post the contents of /etc/yum.repo.d/* in the original post. –  Max Kulik Jul 10 '13 at 23:31
    
@slm: I just added the content of the CentOS-Base.repo file. –  Max Kulik Jul 10 '13 at 23:35

2 Answers 2

You can do the following:

  1. Open /etc/yum.repos.d/CentOS-Base.repo in an editor
  2. Comment out the "mirrorlist" entries.
  3. Uncomment the "baseurl" entries and change them to

    http://vault.centos.org/4.9/os/$basearch
    

Or better, stop using unsupported OSes.

share|improve this answer

Please let us know the .repo files inside your /etc/yum.repos.d/

try

grep -iRl update /etc/yum.repos.d/

And find the instances of update inside the .repo file. probably you need to put

enable=0

For the repo file section of "update"

Otherwise, try opening each and every .repo file you have inside the /etc/yum.repos.d/ and check for repo section "update" and if you can spot anything, try disabling it by putting 0 to enable line.

Let us know if that worked for you

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.