Cannot find a valid baseurl for repo: base/7/x86_64

Issues related to applications and software problems
Mrvn13
Posts: 2
Joined: 2018/09/23 09:04:56

Re: Cannot find a valid baseurl for repo: base/7/x86_64

Post by Mrvn13 » 2018/09/23 09:13:09

$releasever variable cannot be found.

type this:
echo 7 > /etc/yum/vars/releasever
yum update

Regards,

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot find a valid baseurl for repo: base/7/x86_64

Post by TrevorH » 2018/09/23 17:06:47

Yeah, don't do that. While it may work it's just covering up the real problem. The yum variable $releasever gets set automatically from the package pointed to by distroverpkg= in yum.conf using the equivalent of running rpm -q --qf '%{version} centos-release and if it's not working then it's a symptom that you have other problems. Overriding it by forcing it using a yum var file is not the correct solution.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Mrvn13
Posts: 2
Joined: 2018/09/23 09:04:56

Re: Cannot find a valid baseurl for repo: base/7/x86_64

Post by Mrvn13 » 2018/09/23 17:28:41

In my case the real problem was with /var/lib/rpm/Packages file, which had only 166 packages in it and was with missing centos-release package.
This solved the issue and after yum update I reinstalled previous installed packages and updated the system to the latest version.

In my case the system was not far behind to latest one and I didn't had any problems with dependencies.

Regards,

Post Reply