본문 바로가기

CentOS/Study

[Linux]Another app is currently holding the yum lock; waiting for it to exit...

반응형

1. yum 명령어시 아래와 같은 명령어 발생

[root@localhost ~]# yum -y install gcc pcre pcre-tools pcre-devel
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 3399.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  24 M RSS (1.0 GB VSZ)
    Started: Thu Feb 10 20:25:47 2022 - 01:58 ago
    State  : Sleeping, pid: 3399
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  25 M RSS (1.0 GB VSZ)
    Started: Thu Feb 10 20:25:47 2022 - 02:00 ago
    State  : Sleeping, pid: 3399
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  25 M RSS (1.0 GB VSZ)
    Started: Thu Feb 10 20:25:47 2022 - 02:02 ago
    State  : Sleeping, pid: 3399
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  26 M RSS (1.0 GB VSZ)
    Started: Thu Feb 10 20:25:47 2022 - 02:04 ago
    State  : Sleeping, pid: 3399
^C

Exiting on user cancel.

 

2. /etc/resolv.conf 확인(nameserver 정상)

[root@server1 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search example.com
nameserver 8.8.8.8

 

3. ping 확인(ping 확인)

[root@server1 ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=60.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=128 time=194 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=128 time=151 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=128 time=59.7 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3035ms
rtt min/avg/max/mdev = 59.678/116.229/194.447/58.418 ms

 

nameserver  와 ping 은 정상인 것으로 보아 정상이였다.

 

다만, yum 명령어 시 에러가 발생하였다.

 

이와 같은 에러를 해결 하려면 아래와 같이 진행 하면 된다.

 

1. yum 프로세스 중지

[root@localhost ~]# ps -ef | grep yum
root       3399   3129 12 20:25 ?        00:00:29 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py get-updates none
root       4350   3728  0 20:29 pts/1    00:00:00 grep --color=auto yum
[root@localhost ~]# kill -9 3728

 

2. yum.pid 제거

[root@localhost ~]# ls /var/run/
abrt                      faillock       mount           sm-notify.pid
alsactl.pid               gdm            netreport       spice-vdagentd
atd.pid                   initramfs      NetworkManager  sshd.pid
auditd.pid                iprdump.pid    plymouth        syslogd.pid
avahi-daemon              iprinit.pid    pm-utils        systemd
certmonger                iprupdate.pid  ppp             tmpfiles.d
chronyd.pid               ksmtune.pid    radvd           tuned
console                   libvirt        rpcbind.lock    udev
crond.pid                 libvirtd.pid   rpcbind.sock    udisks2
cron.reboot               lock           rpc.statd.pid   user
cups                      log            samba           utmp
dbus                      lsm            saslauthd       yum.pid
dhclient-eno16777736.pid  lvm            sdp
dmeventd-client           lvmetad.pid    sepermit
dmeventd-server           mdadm          setransock
[root@localhost ~]# rm -rf /var/run/yum.pid
반응형