DNF报错

1.DNF缓存仓库报错

2505 May  6 13:42:35 localhost dnf: Failed to synchronize cache for repo 'gitlab_gitlab-ee', ignoring this repo.
2506 May  6 13:42:35 localhost dnf: Failed to synchronize cache for repo 'gitlab_gitlab-ee-source', ignoring this repo.
2507 May  6 13:42:35 localhost dnf: Detection of Platform Module failed: Missing PLATFORM_ID in /etc/os-release
vim /etc/yum.repos.d/gitlab_gitlab-ee.repo

1.发现是因为站点转移,更改baseurl为阿里的url

[gitlab_gitlab-ee]
name=gitlab_gitlab-ee
#baseurl=https://packages.gitlab.com/gitlab/gitlab-ee/el/7/$basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ee-source]
name=gitlab_gitlab-ee-source
#baseurl=https://packages.gitlab.com/gitlab/gitlab-ee/el/7/SRPMS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

2.重新更新dnf库

dnf clean all && dnf makecache
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值