Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having trouble with yum. I was able to run yum manually without a problem. However, I have it setup to run automatically. When it would run automatically, I get the following error:
Code:
Error: Cannot find a valid baseurl for repo: base
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
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
I received this message as an email.
I tried uninstalling yum and installing DNF and I'm getting the same error.
I can go into my system and type:
# dnf update
And it works without a problem, but daily I'm still getting the email mentioned above. I've searched to try and figure out how to fix it but can't figure it out.
Can anyone help with this please? I find this puzzling because I've got yum uninstalled now and have installed dnf-automatic instead. But, it is still sending the same message.
My environment is:
Code:
]$ cat /etc/*release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)
Last edited by jim.thornton; 12-21-2020 at 08:41 AM.
CentOS 6 reached its end of life past November. You should point your /etc/yum.repos.d/CentOS-Base.repo to https://vault.centos.org where it is now relegated.
Or just comment it out completely and add a new section for 6.10 to /etc/yum.repos.d/CentOS-Vault.repo instead (and don't forget to enable it).
Even better, consider migrating your system to CentOS 7.
I already showed the results of: # cat /etc/*release
I have a bunch of .repo files in there:
CentOS-Base.repo
CentOS-CR.repo
CentOS-Debuginfo.repo
CentOS-fasttrack.repo
CentOS-Media.repo
CentOS-Sources.repo
CentOS-Vault.repo
CentOS-x86_64-kernel.repo
epel.repo
epel-testing.repo
Should I uninstall DNF then? I uninstalled yum and installed DNF thinking that would solve the problem but it didn't.
leave yum and dnf like they are, your problem is the combo of repos and that the sources can not be found properly. Kick all of them out, get the original config from an actual centos-release-rpm from a mirror near you: For example: mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm
You need to look into the files if the repo is enabled=1
Basically you need only "base" and "updates" enabled, if this works add "extras", then if needed and fitting to your company policy "Centosplus" and "Fedora-Epel". Don't mix epel and epel-testing, when you don't know what you are doing. Most likely, when you didn't change anything, they aren't enabled anyways.
1. backed up all repos in /etc/yum.repos.d
2. Deleted all repos out of /etc/yum.repos.d
3. Deleted /var/cache/yum
4. #dnf clean all
5. Downloaded the suggested rpm package and extracted it -> I copied all the repos into /etc/yum.repos.d
6. # dnf update
From there I waited the night I received the following email at 3:56am:
Code:
Error: Cannot find a valid baseurl for repo: base
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
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
So it looks like that did not help at all.
When I manually run the #dnf update (or #yum update -- when that was installed) it works fine. No error messages regarding repos (only one about MariaDB).
Any other suggestions on how to track down what is happening?
please just use base, updates and show us all repo-confs that are enabled (or have no enabled= in their section).
Did you do as suggested and only use base and updates first and then try out the rest? There now seems to be one repo in use that doesn't fit in. Like you use fedora-epel targetting the wrong rhel version.
please just use base, updates and show us all repo-confs that are enabled (or have no enabled= in their section).
Did you do as suggested and only use base and updates first and then try out the rest? There now seems to be one repo in use that doesn't fit in. Like you use fedora-epel targetting the wrong rhel version.
No, I forgot to do that part. I've now removed all the repos again and my only file is CentOS-Base.repo and the contents are:
Code:
# 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=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
enabled=0
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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
enabled=0
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
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
I guess I will waiting another day and see what happens.
That looks good. Is this working? What happens when you update?
When it is okay put in the other repos one by one and update again and again until you find the faulty/problematic one. Perhaps also look if you need them at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.