I have set up a centOS 6.5 server
using VMWare Workstation 9
on a Windows 8.1
host laptop. When trying to use yum
to install packages I get the following error:
[root@localhost ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
The VM works on other machines (Windows 7
desktop and an Windows 8.1
laptop), just not the one I need it to work on. I am able to ping the host from the guest and the guest from the host, so there is a connection to the internet.
I have uninstalled and reinstalled Workstation 9. Ungraded to workstation 10. Rebuilt the CentOS 6.5 server. Nothing seems to solve the issue.
When I upgraded from Windows 8 to Windows 8.1, I had VMWare installed. I found out later that I should have uninstalled VMWare before upgrading. Could this have messed up my VMWare network adapters?
Anyone have any ideas?
Be sure that you can ping vault.centos.org.
Then edit /etc/yum.repos.d/CentOS-Base.repo
Comment out mirrorlist
and uncomment baseurl
Change all
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
to
baseurl=http://vault.centos.org/$releasever/centosplus/$basearch/
And enjoy your yum update!!! ;)
I think another reason for this error message is if your release is no longer supported. None of the suggestions in this thread worked for me, and my internet connectivity was fine, but then I realized that I'm running Centos 5 (I know, ancient...) which reached its end-of-life on 2017 Mar 31 - right around when the yum repo error started showing up.
Centos 6 version met its EOL last month (November 30, 2020)
You can use one of the unofficial mirrors listed by centos in your /etc/yum.repos.d/CentOS-Base.repo
. In my case (6.10) I used the mirror http://mirror.nsc.liu.se/centos-store/6.10/ and it worked smoothly:
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.nsc.liu.se/centos-store/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# same for the others [updates] etc in the file
for centos 5.4, you can change /etc/yum.repos.d/CentOS-Base.repo
into like this.
[base]
name=CentOS-5.4 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.4/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-5.4 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.4/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5.4 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=addons
baseurl=http://vault.centos.org/5.4/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5.4 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.4/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.4 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=centosplus
baseurl=http://vault.centos.org/5.4/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5.4 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=5.4&arch=$basearch&repo=contrib
baseurl=http://vault.centos.org/5.4/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With