CentOS 6 EOL – BitNinja update and install doesn’t work

You are here:
Estimated reading time: 1 min

CentOS 6 has reached the end of its lifetime on the 30th of November 2020. This means the operating system is no longer supported and the default repositories are no longer available.

So you may run into this error message when trying to use yum to update your packages on your CentOS 6 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

The issue can be resolved by pointing your yum repository configuration to the latest 6.10 CentOs vault.

You can find more information about the lifecycle of other CentOS versions on this link https://wiki.centos.org/About/Product

After the repository configuration is updated BitNinja can be updated alongside the other packages as usual.

How to fix the repo config in CentOS 6?

Issue this command to update the repo config file:
curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo

You can also update the repo config manually if you open the /etc/yum.repos.d/CentOS-Base.repo file and replace the content of the file with the text below.

cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF
If that does not work for some reason or you just want to make sure.

Usually, it is not necessary to change the BitNinja.repo file but if you just want to make sure or the above method does not work you can change the $releasever variable in the file to the OS version which is in CentOS 6’s case is number 6.

The file can be found at /etc/yum.repos.d/BitNinja.repo and it looks like on the screenshot below by default.


So If changing the CentOS base repo file doesn’t work for some reason you can try changing the above file to look like this.
Was this article helpful?
It was not helpful
Views: 967