Errors Rocky

Another app is currently holding the yum lock; waiting for it to exit...The other application is: yum

You try to use yum and get an error

Another app is currently holding the yum lock; waiting for it to exit... The other application is: yum Memory : 96 M RSS (419 MB VSZ) Started: Fri Mar 19 03:11:06 2021 - 7:44:44 ago State : Sleeping, pid: 6217

Pay attention to pid (Process ID)

In this example the pid is 6217 - let us find out what this process is with the command ps

ps

The -e flag means to list all active processes in the standard form

The -f flag makes the output more detailed (full - complete)

ps -ef | grep 6217

root 6217 6215 0 03:11 ? 00:01:18 /usr/bin/python /bin/yum -y install system_latest.rpm root 6259 6217 0 03:12 ? 00:00:00 /bin/sh /var/tmp/rpm-tmp.3TcCYA 2 andrei 30392 29844 0 10:58 pts/0 00:00:00 grep --color=auto 6217

Let us break down the output:

The last line is our own query, so it is of no interest to us. Let us keep the first two lines + I will label the columns

UID PID PPID C STIME TTY TIME CMD root 6217 6215 0 03:11 ? 00:01:18 /usr/bin/python /bin/yum -y install system_latest.rpm root 6259 6217 0 03:12 ? 00:00:00 /bin/sh /var/tmp/rpm-tmp.3TcCYA 2

PPID is the ID of the parent process. That is, of the one that started this process

6217 was started from 6215

At the same time 6217 itself managed to start process 6259

To get rid of process 6217 let us use the command kill

sudo kill -9 6217

If you are interested in tracing the whole chain of calls, it is not hard to do.

Let us walk the chain of processes back to the beginning

ps -ef | grep 6215

root 6215 6114 0 03:11 ? 00:00:00 sudo -S yum -y install system_latest.rpm

ps -ef | grep 6114

andrei 6114 1 0 03:10 ? 00:00:00 bash -c sudo ntpdate -u 0.fi.pool.ntp.org; sudo yum -y update; sudo yum -y upgrade; sudo -S yum -y install system_latest.rpm

Here we have reached the very first yum call from my script. In the same way you can go forward.

There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).

yum-complete-transaction
yum-complete-transaction --cleanup-only

[Errno 28] No space left on device: '//var/lib/yum/rpmdb-indexes/conflicts.tmp'

No match for argument: ntp

No match for argument: ntp
Error: Unable to find a match: ntp

Starting from version eight, CentOS does not use the ntp package. And Rocky is a fork of exactly version 8.

You need to install chrony

sudo yum -y install chrony

Article author: Andrei Olegovich