YUM error

General support questions including new installations
ddouma
Posts: 6
Joined: 2009/05/07 14:40:31

YUM error

Post by ddouma » 2009/05/07 15:09:37

Hi all,

I have a bit of stupid error on my centos 4.6 installation.
If I try to run "yum" I get this error:

[root@server]# yum list
Setting up repositories
not using ftp, http[s], or file for repos, skipping - Null is not a valid release or hasnt been released yet
http://mirror.centos.org/centos/Null/updates/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.




Anyone a idea how to fix this?


Already thanks in advance.
Beste Regards,
David

User avatar
AlanBartlett
Forum Moderator
Posts: 9320
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: YUM error

Post by AlanBartlett » 2009/05/07 16:08:42

Please carefully check your [b]/etc/yum.repos.d/CentOS-Base.repo[/b] file.

It should be similar to this --

[code]
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[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
priority=1
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
priority=1
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
priority=1
protect=1

#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
priority=1
protect=1

#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=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1

#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
priority=2
protect=1
[/code]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: YUM error

Post by pschaff » 2009/05/07 20:25:17

[quote]
...
not using ftp, http[s], or file for repos, skipping - Null is not a valid release or hasnt been released yet
http://mirror.centos.org/centos/Null/updates/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
...[/quote]

If the repo configs turn out not to be the problem, then it would seem that the issue is that "$releasever" is evaluating to "Null".

Not sure what would cause that would happen, but might want to check the results of
[code]
rpm -q centos-release
rpm -V centos-release
cat /etc/redhat-release
grep distrover /etc/yum.conf
[/code]

ddouma
Posts: 6
Joined: 2009/05/07 14:40:31

Re: YUM error

Post by ddouma » 2009/05/08 00:38:08

[quote]
AlanJBartlett wrote:
Please carefully check your [b]/etc/yum.repos.d/CentOS-Base.repo[/b] file.
...[/quote]

Replaced the file with yours, now I get:

Setting up repositories
not using ftp, http[s], or file for repos, skipping - Null 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

Strange....

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: YUM error

Post by pschaff » 2009/05/08 12:40:45

Have a look at my last post.

P.S. Trimmed your last post to eliminate a severe case of redundancy. :-)

By the way, forgot to say: "Welcome to the CentOS fora."

ddouma
Posts: 6
Joined: 2009/05/07 14:40:31

Re: YUM error

Post by ddouma » 2009/05/08 15:18:12

Thanks :) nice to be here...

This is the output of your 4 commands:

[root@douma]# rpm -q centos-release
package centos-release is not installed

[root@ddouma]# rpm -V centos-release
package centos-release is not installed

[root@ddouma]# cat /etc/redhat-release
CentOS release 4.6 (Final)

[root@ddouma]# grep distrover /etc/yum.conf
distroverpkg=centos-release

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: YUM error

Post by pschaff » 2009/05/08 15:44:44

[quote]
ddouma wrote:
Thanks :) nice to be here...

This is the output of your 4 commands:

[root@douma]# rpm -q centos-release
package centos-release is not installed
[/quote]

OK - That's your problem. You need to download a CentOS-4 centos-release package from a nearby [url=http://www.centos.org/modules/tinycontent/index.php?id=30]mirror[/url] and install it with
[code]
rpm -Uvh centos-release-<version>.rpm
[/code]
Then:
[code]
yum clean all
yum update
[/code]

Would be interesting to know how it disappeared.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: YUM error

Post by gerald_clark » 2009/05/08 16:13:34

This is beginning to look like a broken virtual server.
Please post the output of:
uname -a

ddouma
Posts: 6
Joined: 2009/05/07 14:40:31

Re: YUM error

Post by ddouma » 2009/05/09 00:21:52

OUTPUT: Linux servername 2.6.16-550 #1 Fri Mar 23 00:09:11 GMT 2007 i686 i686 i386 GNU/Linux




Maybe stupid question, where do I get the centos-release-.rpm for CentOS 4.6?

I searched the nearby mirrors by only iso's.
And on vault.centos.org I can't find it.

ddouma
Posts: 6
Joined: 2009/05/07 14:40:31

Re: YUM error

Post by ddouma » 2009/05/09 00:34:32

WOW IT WORKS! :) nice... found the files...

Ok next question.. how could this happen?

Post Reply