Yumrepo error all mirror urls are not using ftp http s or file

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 Loa...

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?

Keshava GN's user avatar

Keshava GN

4,1452 gold badges37 silver badges46 bronze badges

asked Jan 28, 2014 at 3:54

TheJimmer's user avatar

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!!! ;)

mwfearnley's user avatar

mwfearnley

3,1372 gold badges31 silver badges35 bronze badges

answered Apr 10, 2015 at 10:40

makidoo's user avatar

makidoomakidoo

6415 silver badges2 bronze badges

7

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

answered Dec 5, 2020 at 19:25

mateuszb's user avatar

mateuszbmateuszb

1,01213 silver badges26 bronze badges

3

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.

answered Apr 19, 2017 at 13:39

michael bietenholz's user avatar

2

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

answered Oct 1, 2017 at 6:19

lisency's user avatar

lisencylisency

4231 gold badge5 silver badges9 bronze badges

1

This happened to a system I support on a remote network and I determined it was due to the customer’s Check Point firewall interfering with normal HTTP traffic. I ran a sudo tcpdump -nn -c 500 -s0 -X port 80 and watched yum get redirected to some kind of portal:

Location: http://x.x.x.x/UserCheck/PortalMain?....

Funny thing is, it was hard to reproduce with curl, which retrieved the mirror list without any problem. I found I had to add the User-agent: urlgrabber/3.1.0 yum/3.2.22 HTTP header that yum uses to trigger Check Point interfering, like this:

$ curl -i 
    -H 'User-agent: urlgrabber/3.1.0 yum/3.2.22' 
    'http://108.61.16.227/?release=5&arch=x86_64&repo=os'
HTTP/1.1 307 Temporary Redirect
Location: http://x.x.x.x/UserCheck/PortalMain?IID=....origUrl=....
Connection: close

Googling for UserCheck/PortalMain shows this is Check Point Firewall. And the IP I obscured there (x.x.x.x) belonged to the customer. This was sufficient proof to tell the customer he needed to make some kind of change to his firewall to allow my system unobstructed internet access (I have no idea what, but I hope he and/or his network team can figure it out).

answered Jan 8, 2015 at 19:22

Steve Kehlet's user avatar

Steve KehletSteve Kehlet

5,9665 gold badges36 silver badges39 bronze badges

1

Adding the following before yum update -y helped me to fix the problem:

yum clean all
echo "http://vault.centos.org/5.11/os/x86_64/" > /var/cache/yum/base/mirrorlist.txt
echo "http://vault.centos.org/5.11/extras/x86_64/" > /var/cache/yum/extras/mirrorlist.txt
echo "http://vault.centos.org/5.11/updates/x86_64/" > /var/cache/yum/updates/mirrorlist.txt

BTW, CentOS 5 had already reached EOL

answered Feb 28, 2019 at 10:58

Sudheesh.M.S's user avatar

Sudheesh.M.SSudheesh.M.S

4981 gold badge7 silver badges13 bronze badges

CentOS 6.10 after 2021-01-15

CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/$basearch//RPM-GPG-KEY-CentOS-6

CentOS-fasttrack.repo

[fasttrack]
name=CentOS-6 - fasttrack
baseurl=https://vault.centos.org/6.10/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/6.10/$basearch/RPM-GPG-KEY-CentOS-6

CentOS-SCLo-scl.repo

# CentOS-SCLo-sclo.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more
# information

[centos-sclo-sclo]
name=CentOS-6 - SCLo sclo
baseurl=https://vault.centos.org/6.10/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-testing]
name=CentOS-6 - SCLo sclo Testing
baseurl=https://vault.centos.org/6.10/sclo/$basearch/sclo/
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-source]
name=CentOS-6 - SCLo sclo Sources
baseurl=https://vault.centos.org/6.10/sclo/$basearch/sclo/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-debuginfo]
name=CentOS-6 - SCLo sclo Debuginfo
baseurl=https://vault.centos.org/6.10/sclo/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

answered Jan 18, 2021 at 9:56

Intacto's user avatar

IntactoIntacto

5233 silver badges7 bronze badges

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_old

vi /etc/yum.repos.d/CentOS-Base.repo


[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/6.9/os/$basearch
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
exclude=redhat-logos

yum clean all

yum update -y 

Enjoy!!!!

answered Mar 15, 2021 at 13:14

Ali Raza's user avatar

Ali RazaAli Raza

1481 silver badge3 bronze badges

In the same vein as the other posts regarding the updates to /etc/yum.repos.d/CentOS-Base.repo, I additionally had to modify the baseurl values in the following files:

sudo vi /etc/yum.repos.d/CentOS-SCLo-scl.repo
sudo vi /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

You might want to ls /etc/yum.repos.d/ and look over the contents of any other files in there which might need updating for an EOL distro version.

Also, but sure to clear the yum cache with sudo yum clean all.

answered May 4, 2021 at 22:14

BuvinJ's user avatar

BuvinJBuvinJ

9,8435 gold badges79 silver badges93 bronze badges

CENTOS 6.10

  • Backup File /etc/yum.repos.d/CentOS-Base.repo
  • After backup edit file and copy the following content:
[base]

name=CentOS-$releasever - Base

baseurl=https://vault.centos.org/6.10/os/$basearch/

gpgcheck=1

gpgkey=https://vault.centos.org/6.10/os/$basearch//RPM-GPG-KEY-CentOS-6

#released updates 

[updates]

name=CentOS-$releasever - Updates

baseurl=https://vault.centos.org/6.10/updates/$basearch/

gpgcheck=1

gpgkey=https://vault.centos.org/6.10/updates/$basearch//RPM-GPG-KEY-CentOS-6


#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

baseurl=https://vault.centos.org/6.10/extras/$basearch/

gpgcheck=1

gpgkey=https://vault.centos.org/6.10/extras/$basearch//RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

baseurl=https://vault.centos.org/6.10/centosplus/$basearch/

gpgcheck=1

gpgkey=https://vault.centos.org/6.10/centosplus/$basearch//RPM-GPG-KEY-CentOS-6


#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib

baseurl=https://vault.centos.org/6.10/contrib/$basearch/

gpgcheck=1

gpgkey=https://vault.centos.org/6.10/contrib/$basearch//RPM-GPG-KEY-CentOS-6

sɐunıɔןɐqɐp's user avatar

sɐunıɔןɐqɐp

3,14715 gold badges35 silver badges39 bronze badges

answered Jul 17, 2021 at 19:08

TRV's user avatar

0

The answer from @Steve Kehlet above got me on the correct path after finding this Q&A searching for the same symptom. More generally though, the answer turns out to be any sort of filtering web proxy (frequently employed within Corp environments) can cause this when it redirects yum’s «http» request. In many of these cases, vendors provide a «web proxy» of some sort (specific to each particular firewall/filtering implementation — ask your sysadmins).

The important part not mentioned in this answer so far is, you can make CentOS yum work with this proxy, by adding the following line to /etc/yum.conf

proxy=http://proxy.yoursite.whatever:port_num

This will let yum know how to work with your company’s proxy, and fix the unintuitive «All mirror urls are not using…» error

answered Jan 10, 2017 at 0:33

JesseM's user avatar

JesseMJesseM

1914 silver badges7 bronze badges

I faced the same problem with CentOS 5.11 and here complete solution file I ended up with :-

nano /etc/yum.repos.d/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
# http://vault.centos.org/5.11/
# http://vault.centos.org/5.11/updates/
# 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
baseurl=http://vault.centos.org/5.11/centosplus/$basearch/

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


#released updates 
[updates]
name=CentOS-$releasever - Updates

baseurl=http://vault.centos.org/5.11/updates//$basearch/

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


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

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.11/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-$releasever - Plus
baseurl=http://vault.centos.org/5.11/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-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/

gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

answered Apr 7, 2018 at 0:04

Salem's user avatar

SalemSalem

6127 silver badges24 bronze badges

For anybody else stuck in the past,

From within a docker container centos:centos5

# cat CentOS-Base.repo
[base]
name=CentOS-5.11 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=os
baseurl=http://archive.kernel.org/centos-vault/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-5.11 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=updates
baseurl=http://archive.kernel.org/centos-vault/5.11/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.11 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=addons
baseurl=http://archive.kernel.org/centos-vault/5.11/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.11 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=extras
baseurl=http://archive.kernel.org/centos-vault/5.11/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.11 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=centosplus
baseurl=http://archive.kernel.org/centos-vault/5.11/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.11 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=contrib
baseurl=http://archive.kernel.org/centos-vault/5.11/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

I had to also change this libselinux.repo

# cat libselinux.repo
[libselinux]
name=CentOS-$releasever - libselinux
baseurl=http://archive.kernel.org/centos-vault/5.11/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
includepkgs=libselinux*

answered Sep 20, 2019 at 5:59

amacvar's user avatar

amacvaramacvar

3113 silver badges8 bronze badges

Here we need to only put correct baseurl in /etc/yum.repos.d/CentOS-Base.repo

check this URL http://mirror.cisp.com browse your OS and take that URL

If you have Centos6.10 then your baseurl as follow

baseurl=http://mirror.cisp.com/CentOS/6.10/

answered Dec 10, 2020 at 12:44

user14801220's user avatar

  1. vim /etc/yum.repos.d/myrepo.repo
  2. Paste these lines:
[centos]
name=CentOS-6.10 - 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
  1. save file and exit.
  2. yum repolist.
  3. yum install nmap

answered Mar 28, 2022 at 11:30

Gopesh Bharadwaj's user avatar

Check if you are able to ping an externals site such as www.google.com.
If not insert lines:

nameserver 208.67.222.222
nameserver 208.67.220.220

in /etc/resolve.conf

Also in /etc/yum.repos.d/CentOS-Base.repo

uncommented all the mirrorlist and comment out all the baseurl

If mirrorlist doesn’t work for you you can try only the baseurl.

Hope it helps!!

answered Jan 28, 2014 at 14:16

Amar's user avatar

AmarAmar

2,1411 gold badge13 silver badges16 bronze badges

2

There are two things you can do:

  1. Go to /etc/sysconfig/network-scripts/ and verify your interface file, ifcfg-eth0 for example. Change «NM_CONTROLLED» from «yes» to «no». Restart network.
  2. Go to /etc/sysconfig/network-scripts/ and edit ifcfg-eth0. Add DNS1=8.8.8.8 and DNS2=. First entry is Google Public DNS. Restart network.

One of these should fix your issue.

Also, if you didn’t do this yet, go back to original /etc/yum.repos.d/CentOS-Base.repo file.

answered Feb 19, 2014 at 18:09

lkhudisman's user avatar

Comment out metadata_expire directive in /etc/yum.conf and do yum clean all. This worked for me. Not sure how.

answered Aug 6, 2014 at 11:37

Bharath Tupaki's user avatar

[root@server1 ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, 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. echo/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

  • Answer

If you see the above error means first you need to check the internet is working or not (ping 8.8.8.8) , if the internet is working means you can debug otherwise check your firewall and get the internet.

answered Jun 23, 2016 at 5:13

john3's user avatar

Фиксим ошибку обновления и установки приложений в CentOS6

02 Feb 2021 | Автор: dd |

В связи с прекращением поддержки CentOS 6.Х, случившейся в конце ноября 2020 года, начинают возникать проблемы как с обновлением системы, так и установки пакетов в произвольной конфе, т.к система начинает ругаццо на отсутствие репозитариев

# yum -y update
или
# yum -y install %любой пакет%
Loaded plugins: fastestmirror
Setting up Install 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

Все что там нужно – это подправить репы на актуальные, для чего открываем файл репозиториев CentOS-Base.repo и комментируем все mirrorlist и меняем все baseurl (а точнее добавляем к закомментированым) на актуальный вариант
baseurl=https://vault.centos.org/6.10/os/$basearch/

если почему то вдруг не зайдет, то меняем целиком первые три пункта в файле
# vi /etc/yum.repos.d/CentOS-Base.repo

[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/
baseurl=https://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://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://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://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

сохраняем файло, чистим кэши и запускаемся по новой
# yum clean all
# yum -y update

Rating: 3.9/10 (53 votes cast)

Rating: +1 (from 19 votes)

Фиксим ошибку обновления и установки приложений в CentOS6, 3.9 out of 10 based on 53 ratings

Теги: centos

In this article I will show how to fix CentOS 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s]

Problem

When trying update CentOS 6 with yum update command getting error:

Loaded plugins: fastestmirror, refresh-packagekit, security
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

Cause

CentOS 6 reached end of life on the 30th November 2020. YUM attempting connect to deprecated repositories. So, we need update deprecated repositories URL’s and point to the vault.

Resolution

To fix this problem you edit /etc/yum.repos.d/CentOS-Base.repo and replace all mirrorlist

1. Go to /etc/yum.repos.d/ directory:

# cd /etc/yum.repos.d/

2. Make copy of original file:

# cp CentOS-Base.repo CentOS-Base.repo.old

3. Open and edit file with any text editor:

# vi CentOS-Base.repo

4. Replace mirrorlist‘s

Replace sections:

[base]
[updates]
[extras]

With following:

[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/
baseurl=https://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://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://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://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

5. Clean yum cache

# yum clean all

6. Run again yum update command:

# yum update

Now you can successfully update your CentOS 6.

Discuss article in ArsTech Forum

 

 

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

If you doing a yum update or yum install for CentOS 6. You might face the error:

Setting up Upgrade Process
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 retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

This is because YUM repository was removed from the main CentOS update servers. As a result, no security or feature upgrades are provided.

Where are these obsolete Yum Repository now? They are found in CentOS Vault Repository. To use the Vault repository, set up its repo configuration instead of the now defunct repositories configuration:

# curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo

You may want to edit CentOS-Base.repo directly. My OS is CentOs 6.9

.....
.....
[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/
baseurl=https://vault.centos.org/6.9/os/$basearch/
enabled=1
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://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.9/updates/$basearch/
enabled=1
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://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.9/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://mirror.centos.org/centos/$releasever/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://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

For EPEL Repository

# curl https://www.getpagespeed.com/files/centos6-epel-eol.repo --output /etc/yum.repos.d/epel.repo

For SCLO repositories

# curl https://www.getpagespeed.com/files/centos6-scl-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl.repo
# curl https://www.getpagespeed.com/files/centos6-scl-rh-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

References:

  1. How to fix yum after CentOS 6 went EOL

how-to-fix-yumrepo-error-all-mirror-urls-are-not-using-ftp-http-s-or-file

In this article I will show how to fix CentOS 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s]

Background

I’m still using CentOS 6 in some of my VPSes. I just don’t have the time to do either migrate or update them. When I’m trying to update some of my packages, the yum package manager respond with this error:

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

Centos EOL

It seems that some URLs in my repository configuration aren’t valid anymore. After a quick googling, I figured out that I need to replace the URL with vault.centos.org.

$ cd /etc/yum.repos.d/

To update our repository configuration with new URL, first we need to backup your current repository configuration file.

$ sudo cp CentOS-Base.repo CentOS-Base.repo.backup

Then, edit your repository configuration file using your favorite text editor. I’m using vi in this example:

$ sudo vi CentOS-Base.repo

Basically we need to change from this value:

#baseurl=http://mirror.centos.org/centos/$releasever

To this value:

baseurl=https://vault.centos.org/6.10

Thankfully, we can do this easily using vi:

:%s/#baseurl=http://mirror.centos.org/centos/$releasever/baseurl=https://vault.centos.org/6.10/g

Save the file with:

:wq

And then re-run yum update process:

$ sudo yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
base | 3.7 kB 00:00
epel | 4.7 kB 00:00
epel/primary_db | 6.1 MB 00:00
extras | 3.4 kB 00:00
mariadb | 2.9 kB 00:00
remi-php73 | 3.0 kB 00:00
remi-php73/primary_db | 202 kB 00:00
remi-safe | 3.0 kB 00:00
remi-safe/primary_db | 1.2 MB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 12 MB 00:08
No Packages marked for Update

Note

Although this method could help mitigate the issue, it’s still recommended to upgrade your CentOS version.

Final Words

I hope that you now know how to fix yum error: Cannot find a valid baseurl for repo: base. If you run into any issues or have any feedback feel free to drop a comment below.

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

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Yume miru kusuri registry error
  • Yum http error 407 proxy authentication required
  • Yum error nothing to do
  • Yum error 256
  • Youtube произошла ошибка повторите попытку на телефоне

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии