RHEL9에서는 로컬 YUM Repo를 생성하고 /RHEL9-REPO 아래에 모든 파일을 복사했습니다.
/etc/yum.repos.d/rhel-lcoal.repo의 내용
[rhel-baseos]
name= RHEL 9.0 Local BaseOS YUM REPO
baseurl= file:///RHEL9-REPO/BaseOS
enabled=1
gpgcheck=0
[rhel-AppStream]
name= RHEL 9.0 Local AppStream YUM REPO
baseurl= file:///RHEL9-REPO/AppStream
enabled=1
gpgcheck=0
"dnf clean all" 및 "dnf repolist -v"를 실행하면 이 오류가 발생합니다.
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, kpatch, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, uploadprofile
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
DNF version: 4.10.0
cachedir: /var/cache/dnf
RHEL 9.0 Local BaseOS YUM REPO 94 MB/s | 1.7 MB 00:00
Errors during downloading metadata for repository 'rhel-baseos':
- Downloading successful, but checksum doesn't match. Calculated: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(sha256) Expected: 951a2367c42d5c3fb70e6d8ad430d120cc32e639b361139eaf68d8d2c6569003(sha256)
Error: Failed to download metadata for repo 'rhel-baseos': Yum repo downloading error: Downloading error(s): repodata/951a2367c42d5c3fb70e6d8ad430d120cc32e639b361139eaf68d8d2c6569003-productid.gz - Cannot download, all mirrors were already tried without success
답변1
이 오류를 제거하려면 로컬 저장소에 대한 메타데이터를 수동으로 생성해야 합니다. 다음을 수행할 수 있습니다.
createrepo -v /RHEL9-REPO/BaseOS/
createrepo -v RHEL9-REPO/AppStream
컴퓨터와 RPM 패키지 수에 따라 이 명령을 실행하는 데 몇 분 정도 걸릴 수 있습니다.
dnf clean all
dnf repolist -v
그러면 문제가 해결될 것입니다.