Problem with $releasever on centos 7.3. : As shown that var is not filled in:

[root@answeb yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
repo id                                repo name                                               status
base/$releasever/x86_64                CentOS-$releasever – Base                                    0
centosplus/$releasever/x86_64          CentOS-$releasever – Plus                                    0
epel/x86_64                            Extra Packages for Enterprise Linux 7 – x86_64          11,629
extras/$releasever/x86_64              CentOS-$releasever – Extras                                  0
updates/$releasever/x86_64             CentOS-$releasever – Updates                                 0
repolist: 11,629

The repofiles exist in /etc/yum/repos.d but somehow the rpm is missing:

[root@answeb yum.repos.d]# rpm -qi centos-release
package centos-release is not installed
[root@answeb yum.repos.d]# rpm -qa \*release
[root@answeb yum.repos.d]#

Get that rpm with curl because right now you can not use yum to install from the web:

curl -O
yum localinstall centos-release-7-3.1611.el7.centos.x86_64.rpm

Now yum repolist is fine again:

[root@answeb yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * centosplus:
 * epel:
 * extras:
 * updates:
repo id                           repo name                                                    status
base/7/x86_64                     CentOS-7 – Base                                               9,363
centosplus/7/x86_64               CentOS-7 – Plus                                                  71
epel/x86_64                       Extra Packages for Enterprise Linux 7 – x86_64               11,629
extras/7/x86_64                   CentOS-7 – Extras                                               337
updates/7/x86_64                  CentOS-7 – Updates                                            1,585
repolist: 22,985
[root@answeb yum.repos.d]#


Comments are closed.