Existing lock /var/run/yum.pid: another copy is running

This is a very common error which you might come across in Red Hat Linux distro while trying to run yum command

Error:
# yum install bind
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 3054.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  49 M RSS (343 MB VSZ)
    Started: Fri Mar 14 03:32:19 2014 - 00:10 ago
    State  : Sleeping, pid: 3054
Reason
As you see from the error it says yum command is locked by another application. yum command can be run only one at a time in one machine. In case you try to run it on multiple terminals then you will get the above pop up error unless the lock is released by the application which is using yum.

Solution:
Look out for the process id and the user who is using the yum command

# ps aux | grep yum
root      3054  0.5  4.9 351016 49860 pts/1    S+   03:32   0:00 /usr/bin/python /usr/bin/yum install bind bind-chroot
root      3083  5.4  2.5 341876 25596 ?        S    03:34   0:01 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py refresh-cache yes
root      3087  0.0  0.0 103244   860 pts/2    S+   03:35   0:00 grep yum

So in my case 3054 PID is used by deepak user. You can either notify user deepak and check the time of how long his application will lock yum

or else you can go ahead and kill the PID
# kill -9 3054

Next try to run the command yum from your console. It should run like Milkha Singh (just kidding..).

Follow the below links for more tutorials

Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
How to configure Samba 4 Secondary Domain Controller
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is kernel-PAE in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux
How to auto start service after reboot in Linux
What is virtual memory, paging and swap space?