1. Clean up yum db:
sudo rm -f /var/lib/rpm/__db*
sudo rpmdb -vv –rebuilddb
2. If the problem persists, check your proxy config:
sudo grep ‘proxy’ /etc/yum.conf
Note that the proxy config should be present in yum.conf, even if you already set a value for http_proxy