Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Yum gets stuck  (Read 6627 times)

0 Members and 1 Guest are viewing this topic.

nandulalr

  • Guest
Yum gets stuck
« on: December 13, 2018, 12:31:05 am »
Yum gets stuck

Sometimes Yum gets stuck when we are trying to install or update packages. No error messages will be displayed at that time. It just freezes after 2 lines of output:

There could be several reasons why it happens, and the fixes are pretty simple.

1. Check if you have the DNS set properly in your server. You can try something like:

Code: [Select]
ping www.google.com
If you are getting a response, your DNS is working fine. If not, check the /etc/resolv.conf file Add the following in it (if not already exists):

Code: [Select]
nameserver 8.8.8.8
Now try again. If it still does not work, check step 2

2. Clean and rebuild the RPM databases. Keep a backup before removing the files.

Code: [Select]
rm -f /var/lib/rpm/__*
rpm --rebuilddb -v -v
yum clean all

It should work now. If you’re still facing issues, it’s probably the firewall. Check your firewall rules and make sure that the server can contact the remote repositories.