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.

When trying to run yum, I get the following error:

Another app is currently holding the yum lock; waiting for it to exit...

The other application is: yum

I've manually killed each yum process id, but it keeps on occurring (other application is: yum), although the days ago become more recent (used to be 3 days ago, then 1 day ago)..

Any idea what's wrong?

share|improve this question

6 Answers 6

Probably because yum has previously been shutdown uncleanly it's left behind an old lock file.

Try

sudo killall yum
sudo rm /var/run/yum.pid

then restart yum

share|improve this answer
    
This was my first thought too. Try this. –  egorgry Nov 28 '10 at 21:36

I'm not a Red Hat user so this will be a bit vague; a quick search suggests that there is a yum.lock file somewhere in /var/ - try finding that and/or a yum.pid (or similar) and eliminate them.

share|improve this answer

Sure. Two yum processes can't hold the lock at once, or else you'd get corrupt yum metadata and potentially a corrupt RPM database. If you or another admin leave yum running in another session, you'll get this error. Or, perhaps you have something like yum-cron enabled, causing it to periodically be run automatically.

share|improve this answer

EDIT: This is Only valid if your running X

Due to the poise of the question I'd say it may be likely OP, that you have an update window open or may have the package manager open while trying to run yum via shell. This can cause the same result.

hope this helps if the other answers dont.

share|improve this answer

Do you have yum-updatesd set to run on system startup? In my experience this can cause the error you have specified, when it is trying to check for and install updates in the background as you are attempting to use yum from the command line.

share|improve this answer

This can be caused by yum-updatesd when a proxy is required but not set in yum.conf. The service tries to check for updates, gets hung and then just sits there.

Also, as previously mentioned, if you're running X and there's a popup about available packages, that can hog the lock.

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.