Another app is currently holding the yum lock
When I try to follow the instructions on this page
http://www.fedorafaq.org/#yumconf I get this message in the terminal window: Another app is currently holding the yum lock; waiting for it to exit... As far as I can see, I don't have anything running except the Firefox browser, Kate editor and the terminal. And I stopped the service yum-updatesd is stopped So now what? How can I run yum? And how do I escape out of the terminal window, which just keeps scrolling the same message over and over? Fer pete sake. |
Quote:
To find out what's locking up yum, try running: # ps aux | grep yum Note the PID number of the process and run this to kill the process: # kill <insert PID number> Check to see if the process has been killed by rerunning: # ps aux | grep yum If not, rinse and repeat until the process is killed; some processes can be very stubborn. |
If you have a terminal window open on the desktop and can't kill it by clicking the X button in the top-right, you can use xkill. If you are using KDE, hit ALT+F2, which will call up a run command window. (I'm not sure what it would be in GNOME.) Type in "xkill" and hit enter. The cursor will turn into a skull-and-crossbones. Click on the application you want to kill, and it will kill it.
If you are sure you don't have yum currently running, then something prob'ly happened last time it was run, and it didn't remove the lock. Somewhere in /var, there will be a yum.lock file. I forget exactly where it is and am not on a computer with yum. Search for it, and you should find it. Delete the lock file, and you should be able to run yum again. |
su -c 'chkconfig --level 2345 yum-updatesd off' will work. Every other workaround seems to only kill yum-updatesd for runlevel 5. Try yum update after that. Keep in mind that you will no longer be informed that there updates available and as such you will need to check periodically with yum check-update.
|
The easiest way to find out which process has a lock is to cat /var/run/yum.pid.
While using the kill command to kill that process will stop it, the command probably won't get rid of the yum.pid file. You may have a lock file sitting out there and no process belonging to it. If you enter ps < /var/run/yum.pid and only get the PID TTY TIME CMD headers you can delete the file and the lock will be removed. If you get process information than something is still running and you can track it down. Be careful when killing a yum process, it may be busy doing an rpm update and you can then cause trouble with your rpm database. If it is yum-updatesd, use the command service yum-updatesd stop. This will be a much nicer way of stopping the process than the kill command. You can use the command service yum-updatesd status to see if it is running. Though typically yum-updatesd will finish checking for updates in a few minutes and free up the lock. Glennzo's way will only stop the yum-updatesd service from starting up on reboots, not stop the current service from running. As mentioned earlier Cntl+C will stop the current process on a terminal screen. Bill |
Quote:
Quote:
Sorry, but you're talking to an extremely rusty linux user here. |
Quote:
But when I do # service yum-updatesd status as suggested in another post on this thread, it reports that yum-updatesd (pid 2016) is running... yum did an automatic update earlier today. Does the thing run all the time? And when it is running, does that mean it's 'locked'? I ran it the other day and did an installation of firefox and didn't have any problem. Now, the last couple of times I've tried to run it or the 'Add/Remove Software' GUI, I've been having problems. 'Add/Remove Software' tries to download the list and then freezes near the end and the list never shows in the window. |
Quote:
|
Quote:
|
Quote:
Quote:
Quote:
Bill |
Quote:
So I don't understand this at all. Apparently pirut can run along side yum-updatesd as long as it's in the mood to do so. So now I'm wondering if I can do a yum install command while yum-updatesd is running. Anyway, thanks for your help. Sure beats trying to get Billy on the phone. Now if I sleep on all this information for a couple of nights, maybe I'll get this yum thing figured out. Thanks again, guys. |
yum and pirut can run when yum-updatesd is running as long as it isn't actively doing something. As a daemon it just sits out there and waits until the appropriate time comes around to run active again. When it is actively doing something it will start a yum lock until it finishes. You'll also get a lock when pirut starts and not be able to use yum at the command line.
My first run of pirut completed. It probably took 20 minutes to get to the actual gui where you can pick packages. I wonder if it has to build something the first time it runs? After it came up, I closed it and brought it up again. It came up much faster the second time, maybe 10-15 seconds. Bill |
Quote:
Quote:
Quote:
Quote:
|
Quote:
Bill |
Another application is holding yum lock ........
Try this:
Open a terminal. Become superuser by entering 'su' and then the password. Then, # cd /var/run/ # dir Look for the 'yum.pid' file. # rm -f yum.pid # dir Confirm that the 'yum.pid' file has been deleted. # yum update This should re-start your update process. |
I know this thread is kinda old but I have had this problem for the past 2 days and being a total linux n00b it has been frustrating the hell outta me. No matter what I did I could not get yum to unlock. Finally I just deleted the yum.pid file and it solved my problem. Just thought I would post my experience.
|
kryznic yes posting to old threads is not a good idea
-- you get a bunch of -- please do not...-- but a search would turn up that running this in the terminal will solve most yum problems , and is recommended as the First thing to try Code:
su - also a "yum.pid" leftover can be from a crash |
I just tried the solution by John W:
Quote:
1. Restart the computer. 2. Open terminal, then su - [Either su with or without -] ( your root password when asked ) yum clean all |
I just figure I would use the search to find something that solved my issue rather than create another thread for a question I am sure has been documented numerous times. Many of the forums I frequent encourage searching, the age of the thread normally does not have a bearing on the resolution. Old or not this thread helped me fix my problem.
|
Awesome straight-forward answer
I was reading through all the thread and everyone was showing how to see the process, but when I got to this very last post and tried it, it worked like a charm.
Thanks for helping us newbies,. Quote:
|
yup, that is what I have had to do a few times, the yum.pid gets eternally locked. Not sure why, but haven't had it happen lately so maybe a fix came down in one of the bazillion updates I see daily lol.
|
Lots of responses here - but here's how I get around this issue. Its similar to other posts where one identifies the yum process/es that is holding the lock on yum and killing that PID/s.
NB: This can be dangerous especially if you kill the wrong PID by mistake. Code:
# ps -ef | grep yum |
Quote:
tnX ..alot .. |
Code:
sudo kill $(cat /var/run/yum.pid) |
Solution 1:
To remove the pid, please run command rm -f and follow with yum.pid path and [pid number] [root@server /]# rm -f /var/run/yum.pid [insert pid] Solution 2: Find out what is the locking up yum by running: [root@server /]# ps aux | grep yum Please take note on the [pid number] of the process and run this command to kill the process: [root@server /]# kill -9 [insert pid] http://www.ehowstuff.com/how-to-reso...or-it-to-exit/ |
Ctrl + D logs you out of root and closes the terminal
if your gui software manager is open then yum will get locked don't run yum and gui software manager simultaneously |
Use killall -9 safe_yum
|
Another app is currently holding the yum lock
i tried editing the file /var/run/yum.pid, deleted the contents, usually it's the pid that's locking yum, and saved it.
This solved the problem for me |
well done guys :
just as a suggestion if you have a tick error. 1. login as root to the linux box #su your pass: #init 3 login: root your pass: #startx now go true to the terminal. e.g ) #yum install update Loaded plugins: langpacks, refresh-packagekit Existing lock /var/run/yum.pid: another copy is running as pid 1232. Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit Memory : 28 M RSS (356 MB VSZ) Started: Sun Sep 28 10:30:23 2014 - 00:18 ago State : Sleeping, pid: 1232 OK ! the PID has been notified at the end of the second line ((1232)) just use: #kill 1232 be lucky. |
All times are GMT -5. The time now is 04:41 PM. |