Despite the fact that otherwise the advice regarding manually setting the $releasever
and $basearch
in the repo file will not hurt on its own (at least as long as you stick to the software version referenced by the values you set), this is not is strictly necessary.
I also have the exact content that you posted in a file called /etc/yum.repos.d/nginx.repo
that functions correctly without explicitly setting the above values.
My recommendation would be to perform yum update
before trying to install (maybe when you tried to install, yum did not request all repo urls from the files in /etc/yum.repos.d/
for the latest versions of their database). Also make sure that your created file ends with .repo
, as otherwise it will be ignored by yum.
Otherwise, check the SElinux security contexts for the files in this directory - or simply do it manually and manually restore them by running restorecon -Rv '/etc/yum.repos.d'
and check the permissions of the repository files manually, which must be root : root and show 644 as file permissions. To change them manually, run chmod 644 /etc/yum.repos.d/nginx.repo
and chown root:root /etc/yum.repos.d/nginx.repo
I hope that part of the above will solve your problems!
BE77Y source share