Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've tried yum update yum and yum clean all, but neither help to resolve the following problem:

# yum install httpd --installroot=/opt/httpd2
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile  
    * rpmforge: repoforge.spinellicreations.com
http://centos.karan.org/el%24releasever/extras/stable/x86_64/RPMS/repodata/repomd.xml:
[Errno 14] HTTP Error 404: Not Found 
Trying other mirror. 
Error: Cannot retrieve repository metadata (repomd.xml) for repository: 
    kbs-CentOS-Extras.
Please verify its path and try again

I've also tried deleting any .repo files for kbs-CentOS-Extras from /etc/yum.repos.d, and re-running the command, without any changes. Here's my system information, just in case:

# uname -a
Linux 2.6.18-274.3.1.el5xen #1 SMP Tue Sep 6 20:57:11 EDT 2011 x86_64 GNU/Linux

I am now using the .repo file provided here. Here is my /etc/yum.conf:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
bugtracker_url=http://bugs.centos.org/yum5bug
timeout=300
installonly_limit = 5

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

The yum.log file is empty, but /var/cache/yum/kbs-CentOS-Misc contains a repomd.xml -- could this perhaps be used instead of the remote copy?

If not, any suggestions for how I can solve this?

share|improve this question
    
Show us the relevant .repo file –  Iain Feb 24 at 21:37
1  
Seems that $releasever is not correctly expanded (el%24releasever). Can you provide us your /etc/yum.conf file ? –  krisFR Feb 25 at 2:10

2 Answers 2

I was able to work around the issue by adding the CentALT x86_64 repository. I first downloaded centalt-release-5-3.noarch.rpm, then ran:

rpm -Uvh centalt-release*rpm

After this, running my original command resulted in package conflicts (it was unhappy that I was re-installing a different version of httpd-tools, even if to an alternate installation directory.)

Since I was only installing to /opt/httpd2 for testing purposes, I abandoned that idea, and successfully installed by running yum upgrade httpd.

share|improve this answer

correct el%24releasever variable name to $releasever in your repo file. for more information about yum variables check yum.conf.

Variables

There are a number of variables you can use to ease maintenance of yum's configuration files. They are available in the values of several options including name, baseurl and commands.

$releasever This will be replaced with the value of the version of the package listed in distroverpkg. This defaults to the version of

'redhat-release' package.

$arch This will be replaced with your architecture as listed by os.uname()[4] in Python.

$basearch This will be replaced with your base architecture in yum. For example, if your $arch is i686 your $basearch will be i386.

$uuid This will be replaced with a unique but persistent uuid for this machine. The value that is first generated will be stored in

/var/lib/yum/uuid and reused until this file is deleted.

$YUM0-$YUM9 These will be replaced with the value of the shell environment variable of the same name. If the shell environment

variable does not exist then the configuration file variable will not be replaced. As of 3.2.28, any file in /etc/yum/vars is turned into a variable named after the filename (or overrides any of the above variables).

Note that no warnings/errors are given if the files are unreadable, so creating files that only root can read may be confusing for users.

Also note that only the first line will be read and all new line characters are removed, as a convenience. However, no other checking is performed on the data. This means it is possible to have bad character data in any value.

also this topic will be useful for understanding yum variables.

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.