Home Linux Server Fixing the “Another app is currently holding the yum lock” error on CentOS

Fixing the “Another app is currently holding the yum lock” error on CentOS

by
Published: Last Updated on
A+A-
Reset

In this article, AZDIGI will show you how to fix the “Another app is currently holding the yum lock” error on CentOS/RHEL.

I. Introduction

If you are a system administrator using CentOS/RHEL, chances are you will encounter the error

This error occurs when you use the yum command to update/install the service. Below is an image of the error message:

AZDIGI Tutorial
Existing lock /var/run/yum.pid: another copy is running as pid [pid].
Another app is currently holding the yum lock; waiting for it to exit...
    
how to fix another-app-is-currently-holding-the-yum-lock

The reason for this error is that a user, including yourself, was previously using the yum command to install/update a service, but the process did not end, causing the next user unable to use yum because the previous process still exists.

II. How to fix the “Another app is currently holding the yum lock” error

There are several ways to fix the “Another app is currently holding the yum lock” error on CentOS/RHEL, and I will go through each method below.

First, you need to SSH or access your VPS/server as root. Or at least log in to the server with a user with sudo privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

Once you have successfully SSH into your server, we can proceed to look at the solutions to this error as follows.

Method 1: Remove the current PID of yum

For this method, you just need to run the following command:

AZDIGI Tutorial
rm -f /var/run/yum.pid
    

Method 2: Find the PID of yum and disable it

For this method, you need to execute the following two commands. The first command will find the PID of yum, and in the second command, you will replace the PID with [yum-pid] so that you can disable it.

AZDIGI Tutorial
ps auxfw | grep yum
kill -9 [yum-pid]
    

Alternatively, you can determine the PID of yum by running the yum command again and identifying it as shown below:

how to fix another-app-is-currently-holding-the-yum-lock

At this point, you can try running the yum command again.

how to fix another-app-is-currently-holding-the-yum-lock

III. Summary

Hopefully, with the above two methods, you will fix the “Another app is currently holding the yum lock” error when using yum.

Wishing you success. See more useful articles about Linux at the following link:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign