How to fix YumRepo Error All mirror urls are not using ftp https or file cent YumRepo

Error All mirror urls are not using ftp https or file cent Fix YumRepo. 

Yum Install Update Repo Error All mirror urls are not using ftp https or file in Linux Cent OS.

If you are facing "YumRepo Error " during the yum update or package installation like this then it will definitely help you..

[root@techitadmin html]# yum -y update

"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" 

In order to resolve this kind of issue I would like to strongly recommend to first take backup of your old Base.repo file.


[root@techitadmin html]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-bak.

Then copy and replace your existing Base.repo with this new modified repository file in your "/etc/yum.repos.d/CentOS-Base.repo". or 

-------------------------------------------------------------------------------
[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
--------------------------------------------------------------------------------
Now run #yum update command.

It will update with new repo, incase during update if you face error like this :-

Package xorg-x11-server-common.x86_64 0:1.17.4-17.el6.centos will be updated Package xorg-x11-server-common.x86_64 0:1.17.4-18.el6.centos will be an update
Finished Dependency Resolution Error: Package: phpMyAdmin-4.0.10.20-1.el6.noarch (@epel)  Requires: php(language) < 7  Removing: php-common-5.6.40-21.el6.remi.x86_64 (@remi-php56) php(language) = 5.6.40  Updated By: php-common-7.2.34-1.el6.remi.x86_64 (remi-php72)  php(language) = 7.2.34 Available: php-common-5.3.3-49.el6.x86_64 (base)
php(language) = 5.3.3 Available: php-common-5.3.3-50.el6_10.x86_64 (updates)                php(language) = 5.3.3 Available: php-common-5.6.40-22.el6.remi.x86_64 (remi-php56)
php(language) = 5.6.40 Available: php-common-5.6.40-23.el6.remi.x86_64 (remi-php56)
php(language) = 5.6.40 Available: php-common-7.0.33-22.el6.remi.x86_64 (remi-php70)
php(language) = 7.0.33 Available: php-common-7.0.33-23.el6.remi.x86_64 (remi-php70)
php(language) = 7.0.33 Available: php-common-7.2.33-1.el6.remi.x86_64 (remi-php72)
php(language) = 7.2.33 You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Then run update command with --skip-broken 

[root@techitadmin html]# yum update --skip-broken
Previous Post
Next Post
Related Posts

3 Comments:

Anon said...

After trying this fix, i get:
Error: File contains no section headers.
file: file:///etc/yum.repos.d/CentOS-Base.repo, line: 13
'[base] name=CentOS-6 - Base\n'

Anon said...

After trying this fix, i get:
Error: File contains no section headers.
file: file:///etc/yum.repos.d/CentOS-Base.repo, line: 13
'[base] name=CentOS-6 - Base\n'

Tech IT Admin said...

You can try to download CentOS-Base.repo file from here https://drive.google.com/file/d/1t6fYfvNQt-eRgbNn5vnZxOUohp5Vunhp/view and try again.

Follow by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.