When I say

# yum update

This is output:

Loaded plugins: fastestmirror, replace, security
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base


This is my base repo:

# cat CentOS-Base.repo 
# CentOS-Base.repo
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.

name=CentOS-$releasever - Base

#released updates 
name=CentOS-$releasever - Updates

#additional packages that may be useful
name=CentOS-$releasever - Extras

#additional packages that extend functionality of existing packages
name=CentOS-$releasever - Plus

#contrib - packages by Centos Users
name=CentOS-$releasever - Contrib
  • Just another question. Do you need to configure a proxy? If so, did you configure it? – mnille Mar 14 '16 at 9:17
  • No I didn't need//// – MLSC Mar 14 '16 at 9:26
  • Have you tried un-commenting baseurl, if not then, please try and show us the output. if you have elink or link then please try to open the link from command line change the line for example releasever10. – Mongrel Mar 14 '16 at 10:58
  • Yes I uncomment base url... the out put is: Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again – MLSC Mar 14 '16 at 11:08
  • You have a working internet connection right. Check your iptables -L & show us the output. do yum clean all also – Mongrel Mar 14 '16 at 11:52

That's probably because the CentOS version you're using reached end-of-life, which means that no new updates will be released by Red Hat, so the tree has been moved to vault.centos.org, and the baseurl= links in the /etc/yum.repos.d/CentOS-Base.repo files should refer to that link.

Please see https://unix.stackexchange.com/a/359927/112443

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.