How to resolve - Another app is currently holding the yum lock; waiting for it to exit...
[Centos7-01 ~]# yum repolist
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id, search-
: disabled-repos, subscription-manager
Existing lock /var/run/yum.pid: another copy is running as pid 3272.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 77 M RSS (515 MB VSZ)
Started: Wed Sep 27 08:57:19 2017 - 00:02 ago
State : Sleeping, pid: 3272
Another app is currently holding the yum lock; waiting for it to exit...
Step1:
# kill 3272
if does not work, hard kill
# kill -9 3272
But this also did not help... Next:
Step 2:
Found that there was old local repository active from the ISO monted to /mnt.
Please disable the old repository - yum repolist will show the details
[centOS7-01 ~]# yum-config-manager --disable "Centos 7.4"
Loaded plugins: langpacks, product-id
============================================================================ repo: InstallMedia ============================================================================
[InstallMedia]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7Server
baseurl = file:///mnt/
cache = 0
Output truncated......
[Centos7-01 ~]# yum repolist
Now please run below commands and install the packages of your choice.
[Centos7-01 ~]# yum clean all
[Centos7-01 ~]# yum update all
[Centos7-01 ~]# yum install ksh
That's it!