Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example I have installed mysql and httpd, but when I'm trying to 'yum update' then yum throws error that package is available but not installed. So, how can I update database of installed software?

This command have no effect:

rpm --rebuilddb
share|improve this question
do this for me. "rpm -qf /usr/sbin/httpd" and please paste the actual error, as well as the output of that command in your question. – Richard June Sep 10 '10 at 20:02
up vote 2 down vote accepted

If you've got a system with files from packages installed but an out-of-sync RPM database, you can use rpm -ivh --justdb somepackage.rpm to update the RPM database without actually installing anything. This is pretty messy, though, and really when you're in this state, it's time to start planning a reinstallation from scratch.

share|improve this answer

How did you install httpd and mysql? It sounds like you did it through source, in which case you won't be able to update it using the repository.

share|improve this answer
MySQL and httpd are installed using yum, but some time ago I backuped binaries and config (without --archive option) and unzipped into new installed system (yum and yum configs to). So how can I do update without new installation? Or how can I reupdate rpm database? – purple Sep 10 '10 at 15:23
Try yum clean all; mv /var/lib/rpm/__db* /root/; rpm –rebuilddb; yum update. If not, you may have to backup the binaries again, install it using yum, then restore from your backups. – James L Sep 10 '10 at 15:29
Not works, maybe there some another ways to synchronize software? – purple Sep 10 '10 at 16:03

Try this

yum clean all
yum search mysql

Make sure your repos are loaded that have the mysql package you want

share|improve this answer
It worked earlier successfully, I just need to update RPM database, see the next answer comment - it will describe my problem. – purple Sep 10 '10 at 15:30

You cannot update the rpmdb manually; it must be done via packages.

share|improve this answer
So I must to reinstall all the packages? – purple Sep 11 '10 at 12:44

There's definitely a language barrier issue here -- the rest of this post is going to assume you installed MySQL and Apache through yum, not from source, and then yum update broke on you.

Check (and post) the rest of your yum output. If a package is available but cannot be installed, that usually means that one of its dependencies is faulty, which happens often if you have both the i386 and x86_64 versions of a package installed and you somehow end up with different versions. Once you get your dependency chain cleaned up, yum update should work normally.

share|improve this answer

Your Answer


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.