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.

On CentOS, when I try to use yum, I keep getting:

    Loaded plugins: fastestmirror, priorities
Could not create lock at /var/run/yum.pid: [Errno 28] No space left on device: '/var/run/yum.pid' 
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  19 M RSS (301 MB VSZ)
    Started: Tue Aug 27 14:27:41 2013 - 00:00 ago
    State  : Running, pid: 21381
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  19 M RSS (301 MB VSZ)
    Started: Tue Aug 27 14:27:41 2013 - 00:02 ago
    State  : Running, pid: 21381
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  19 M RSS (301 MB VSZ)
    Started: Tue Aug 27 14:27:41 2013 - 00:04 ago
    State  : Running, pid: 21381
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  19 M RSS (301 MB VSZ)
    Started: Tue Aug 27 14:27:41 2013 - 00:06 ago
    State  : Running, pid: 21381

My disk space is definitely more than enough. The /var/run/yum.pid file is also missing.

How can I fix yum?

share|improve this question
1  
You're running this command via sudo? –  slm Aug 27 '13 at 7:24
add comment

2 Answers

Can you check what's the process with PID 21381?

ps -p 21381

I would guess you are working from a GUI where a package manager/updater is started automatically and which is currently trying to fetch some updates. Or there may be a cron batch which runs some yum commands periodically. Btw, what distribution is installed on your system?

The easiest way would be to kill that process but firstly verify what it is.

share|improve this answer
    
CentOs 6.1 ps -fea | grep yum root 16191 15756 0 13:09 pts/0 00:00:00 grep yum –  Max Nov 25 '13 at 5:16
add comment

When this happens, yum process is already being ran in the background and a lock file /var/run/yum.pid is created. At this point (if you wanted to terminate yum ) you would send a SIGTERM to the yum process. This is kill -s 15 $(pgrep yum). The other option is to let yum finish it's processing before you run it manually.

share|improve this answer
add comment

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.