problem
Error when installing software using yum
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
Solution
1. View yum configuration file
vim /etc/yum.repos.d/CentOS-Base.repo
2. Add a comment to the mirrorlist in the original configuration, and delete the comment from the baseurl to make it effective. Take the base module as an example, and the other modules are treated the same
base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
It still doesn’t work because the baseurl link mirror.centos.org has no resources.
3. Reconfigure the resource path https://vault.centos.org/6.8/
Modified configuration
# 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.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://vault.centos.org/6.8/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=https://vault.centos.org/6.8/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=https://vault.centos.org/6.8/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=https://vault.centos.org/6.8/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=https://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
4. Clean the cache
yum clean all
rm -rf /var/cache/yum
yum makecache
Run again
Similar Posts:
- Centos6.8 yum Error & Fix YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid
- When centos7 uses yum, file contains no section headers
- [Solved] Linux yum: One of the configured repositories failed (Unknown), and yum doesn’t have.
- This system is not registered with an entitlement server. You can use subscription-manager to reg…
- [How to Solve] Centos 14: problem making ssl connection
- Solve the problem of could not retrieve mirrorlist in centos7 yum
- Centos6 Yum Error: Cannot find a valid baseurl for repo: base
- GDB debugging report missing separate debuginfos problem solving
- [Solved] Docker Install Error: repodata/repomd.xml: [Errno 14] HTTPS Error 404 – Not Found Trying other mirror.
- [Solved] Yum Install Error: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&am…