Skip to content
Advertisement

Terminal hangs when executing yum commands

During a patch window, the yum update command stopped running with a Bus Error. Now when I try to execute a yum command my terminal hangs and I need to kill the process.

I have tried to kill all the yum commands running that showed with the ps -aef | grep yum, this did not help. I have tried to rm -f /var/run/yum.pid and rm -f /var/cache/yum Afterward, I ran the command rpm --rebuilddb after these commands yum still hangs and I need to kill the process.

No matter what yum command I use it hangs. Any suggestions?

Advertisement

Answer

I had a similar issue (on Redhat 7). For me, this worked out:

sudo kill -9 $(ps aux | grep -E 'yum|rpm' | awk '{print $2}')
sudo rm -rf /var/lib/rpm/__db* /var/lib/rpm/.dbenv.lock
sudo rpm --rebuilddb

Be careful though, ‘kill -9’ is a bad way to stop processes. Especially recursive like the above. Use the above as a last effort to overcome you issue, after you have examinated your processes running.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement