YumRepo Error: All mirror URLs are not using ftp, http[s] or file
Solved: YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ . As you might know, Centos 6 reached its End of Life recently. So all the previous repos were deprecated.
Hence you might see the following error while running yum commands on your CentOS 6 servers.
[root@server ~]# yum update Loaded plugins: fastestmirror Setting up Update Process Determining fastest mirrors YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt Error: Cannot find a valid baseurl for repo: base [root@server ~]#
In order to fix this, you need to modify the file /etc/yum.repos.d/CentOS-Base.repo
1. Make a backup of the existing CentOS Base repository file.
cp -pr /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.OLD
2. Edit the file /etc/yum.repos.d/CentOS-Base.repo using your favorite editor. I am using vim editor here:
vim /etc/yum.repos.d/CentOS-Base.repo
3. Modify the mentioned file with the following content:
[base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra baseurl=http://vault.centos.org/6.10/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra baseurl=http://vault.centos.org/6.10/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra baseurl=http://vault.centos.org/6.10/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra baseurl=http://vault.centos.org/6.10/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra baseurl=http://vault.centos.org/6.10/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
4. Run the desired yum command. I am running yum update here:
yum update
That’s it!
Also Read:
- Install Htop on CentOS/RHEL and Ubuntu
- Install GitLab on CentOS 7 and Derivatives
- Install GitLab on CentOS 7 and Derivatives
- Install Zabbix on CentOS 8 and Derivatives
- How to Install Kdenlive Video Editor on Ubuntu
- Install youtube-dl in Ubuntu
- How to Install BleachBit on Ubuntu and Derivatives
- How to install Rambox on Ubuntu and Derivatives
- Install Blender in Ubuntu and its derivatives
- How to install gallery-dl in Ubuntu
- Install and enable sudo command in Debian
- How to Install Kodi on Ubuntu and its Derivatives
- Install FlatPak on Ubuntu and Derivatives
- How to Install DraftSight on Ubuntu and Derivatives
- Install OpenSCAD in Ubuntu, Debian, Fedora and Arch Linux
- How to Install OpenShot on Ubuntu and Derivatives
- How to Install OpenVPN on CentOS and Derivatives
- How to install VidCutter on Ubuntu and Derivatives
- How to Install Sublime Text on Ubuntu and CentOS
- How to Install Spotify on Ubuntu and Derivatives
- Install Zabbix on CentOS 8 and Derivatives
If you like this post and wish to receive more articles from us, please like our FB page: Grepitout
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at info@grepitout.com
Thank You So much
Thanks a lot. it helped me and everything is working fine now.
failed, still getting the same “Error: Cannot find a valid baseurl for repo:”
This fixed the problem for me on my CentOS 6 system – thanks.
Fantastic! That did the job, than you so much!
A big thank you! 🙂
This was the solution for me! Thanks.
Thanks it worked for me
Krishna.
thanks. its worked.
It worked!!!
Thank you so much