Unable to run yum update on centos 7

Not able to run yum update. It fails with the message connection refused.

When I run sudo yum update I get the following message

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist error was
14: curl#7 - "Failed connect to localhost:3000; Connection refused"

I am able to connect to internet.

2

1 Answer

This is my solution.

  1. Find your appropriate version on next site (in this example I'm using 7.0.1406):

  2. Execute next commands to update your yum configuration files:

    sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-*

    sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.conf

    sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\$basearch\//baseurl=https:\/\/vault.centos.org\/7.0.1406\/\1\/\$basearch\//g' /etc/yum.repos.d/CentOS-*

    sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\$basearch\//baseurl=https:\/\/vault.centos.org\/7.0.1406\/\1\/\$basearch\//g' /etc/yum.conf

Good Luck!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like