LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 03-05-2010, 03:09 PM   #16
kryznic
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Rep: Reputation: 0

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.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-05-2010, 03:42 PM   #17
John VV
Guru
 
Registered: Aug 2005
Posts: 13,535

Rep: Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807
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 -
( your root password when asked )
yum clean all
rpm --rebuilddb

also a "yum.pid" leftover can be from a crash
 
Old 03-06-2010, 01:24 AM   #18
trien27
Member
 
Registered: Feb 2005
Location: NYC
Distribution: Fedora 14
Posts: 195

Rep: Reputation: 15
I just tried the solution by John W:
Quote:
su -
( your root password when asked )
yum clean all
Here's how I solved my problem:
1. Restart the computer.
2. Open terminal, then su - [Either su with or without -]
( your root password when asked )
yum clean all
 
Old 03-08-2010, 09:55 AM   #19
kryznic
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Rep: Reputation: 0
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.
 
Old 03-25-2010, 12:18 PM   #20
k0relian
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
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:
Originally Posted by axmukher View Post
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.
 
Old 03-25-2010, 12:50 PM   #21
kryznic
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Rep: Reputation: 0
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.
 
Old 04-09-2010, 08:52 AM   #22
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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
root      3185  1207  0 14:47 pts/1    00:00:00 grep yum
root      3804     1  0 Jan11 ?        00:00:43 /usr/bin/python -tt /usr/sbin/yum-updatesd
# kill -9 3804
# ps -ef | grep yum
root      3197  1207  0 14:48 pts/1    00:00:00 grep yum
# yum update
 
Old 06-06-2011, 09:30 PM   #23
fajifazeel
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by kilgoretrout View Post
Hit Ctrl-C; that's the key combination to kill any currently running process in a bash shell or terminal.

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.

tnX ..alot ..
 
Old 12-18-2011, 08:40 AM   #24
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Rep: Reputation: 81
Code:
sudo kill $(cat /var/run/yum.pid)
 
Old 02-21-2012, 05:18 AM   #25
ehowstuff
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
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/
 
Old 03-03-2012, 05:58 PM   #26
clocker
Member
 
Registered: Sep 2011
Distribution: fedora, redhat, mint
Posts: 87

Rep: Reputation: Disabled
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

Last edited by clocker; 03-03-2012 at 06:00 PM.
 
Old 05-29-2012, 03:59 AM   #27
BowMeow
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Use killall -9 safe_yum
 
Old 04-02-2014, 02:09 AM   #28
anup.ad
LQ Newbie
 
Registered: Apr 2014
Posts: 1

Rep: Reputation: Disabled
Thumbs up 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
 
Old 09-28-2014, 03:40 AM   #29
hamed sameni
LQ Newbie
 
Registered: Sep 2014
Location: tehran
Distribution: CentOS
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 16 02-15-2012 01:28 PM
all software installs hang scroll lock and caps lock lights flash jcorrnt Linux - Hardware 6 02-07-2009 01:44 PM
gnome\kde screen lock app asulwer Programming 2 04-06-2007 10:22 AM
Caps Lock and Num Lock leds dont work! npc Linux - Hardware 2 11-08-2005 11:40 AM
"yum" bad lock error ServalSoft Linux - Software 7 02-09-2004 04:28 PM


All times are GMT -5. The time now is 09:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration