我的自定义yum仓库无法看到RPM文件。

huangapple go评论77阅读模式
英文:

My custom yum repository cannot see RPM files

问题

我已配置了一个带有nginx RPM的自定义存储库。它位于我的本地Artifactory上:https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/
我可以看到我的RPM文件在那里:

  1. Index of rpm-nginx-prod-local/rhel8
  2. Name Last modified Size
  3. ../ repodata/ 11-Apr-2023 12:47 -
  4. nginx-1.18.0-2.el8.ngx.x86_64.rpm 03-Dec-2020 15:00 798.63 KB
  5. nginx-1.20.2-1.el8.ngx.x86_64.rpm 03-Dec-2021 12:07 820.03 KB
  6. nginx-1.22.0-1.el8.ngx.x86_64.rpm 13-Jul-2022 14:28 826.56 KB
  7. nginx-1.22.1-1.el8.ngx.x86_64.rpm 02-Nov-2022 14:03 828.23 KB
  8. Artifactory/7.55.10 Server at artifactory Port 80

我还配置了/etc/yum.repos.d/:

  1. cat /etc/yum.repos.d/nginx-rpms-rhel.repo
  2. [nginx-rpms-rhel]
  3. name=nginx - RHEL8 - x86_64 - REPO
  4. baseurl=https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/
  5. enabled=1
  6. fastestmirror_enabled=0
  7. gpgcheck=0
  8. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  9. proxy=_none_

但是,当我尝试从该存储库列出任何内容时,我收到以下错误:

  1. yum search * --enablerepo=nginx-rpms-rhel --disablerepo="*"
  2. No matches found.
  3. yum install nginx --disablerepo=* --enablerepo=nginx-rpms-rhel
  4. Error: Unable to find a match: nginx
  5. yum install --disablerepo=* --enablerepo=nginx-rpms-rhel nginx-1.22.1-1.el8.ngx.x86_64
  6. Error: Unable to find a match: nginx-1.22.1-1.el8.ngx.x86_64

这对我来说看起来很奇怪,因为我的Artifactory中有RPM文件。我在RHEL8上运行。
我尝试过运行yum clean all,但没有效果。
有任何想法吗?

英文:

I have configured a custom repository with nginx RPMs. It is located on my local Artifactory: https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/
I can see that my RPMs are there:

  1. Index of rpm-nginx-prod-local/rhel8
  2. Name Last modified Size
  3. ../
  4. repodata/ 11-Apr-2023 12:47 -
  5. nginx-1.18.0-2.el8.ngx.x86_64.rpm 03-Dec-2020 15:00 798.63 KB
  6. nginx-1.20.2-1.el8.ngx.x86_64.rpm 03-Dec-2021 12:07 820.03 KB
  7. nginx-1.22.0-1.el8.ngx.x86_64.rpm 13-Jul-2022 14:28 826.56 KB
  8. nginx-1.22.1-1.el8.ngx.x86_64.rpm 02-Nov-2022 14:03 828.23 KB
  9. Artifactory/7.55.10 Server at artifactory Port 80

I also configured /etc/yum.repos.d/:

  1. cat /etc/yum.repos.d/nginx-rpms-rhel.repo
  2. [nginx-rpms-rhel]
  3. name=nginx - RHEL8 - x86_64 - REPO
  4. baseurl=https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/
  5. enabled=1
  6. fastestmirror_enabled=0
  7. gpgcheck=0
  8. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  9. proxy=_none_

But when I try to list anything from that repo I get:

  1. yum search * --enablerepo=nginx-rpms-rhel --disablerepo="*"
  2. No matches found.
  3. yum install nginx --disablerepo=* --enablerepo=nginx-rpms-rhel
  4. Error: Unable to find a match: nginx
  5. yum install --disablerepo=* --enablerepo=nginx-rpms-rhel nginx-1.22.1-1.el8.ngx.x86_64
  6. Error: Unable to find a match: nginx-1.22.1-1.el8.ngx.x86_64

This looks really odd to me, because there are rpms in my Artifactory. I'm running on RHEL8.
I've tried to do yum clean all, but it is not the case.
Any ideas?

答案1

得分: 0

你可以尝试从以下命令中删除 "nginx.*yaml":

  1. rm -rf /var/lib/dnf/modulefailsafe/nginx*.yaml
英文:

You can try to remove nginx.*yaml from

  1. rm -rf /var/lib/dnf/modulefailsafe/nginx*.yaml

huangapple
  • 本文由 发表于 2023年4月19日 16:49:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76052504.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定