How to create repomd.xml when not online

329 Views Asked by At

I've copied all the rhel9 iso files to a folder on my RHEL9. The folder does not have a repodata file nor obviously, a repomd.xml file. I found and installed the files called

rpm -i /mnt/repo_filz/AppStream/Packages/createrepo_c-libs-0.20.1-1.el9.x86_64.rpm
rpm -i /mnt/repo_filz/AppStream/Packages/createrepo_c-0.20.1-1.el9.x86_64.rpm

When I run a dnf install command I see the statement: Updating Subscription Management repositories.

RHEL 9 Local Repository 0.0 B/s | 0 B 00:00

Errors during downloading metadata for repository 'rhel9':

  - Curl error (37): Couldn't read a file:// file for file:///mnt/repo_filz/repodata/repomd.xml [Couldn't open file /mnt/repo_filz/repodata/repomd.xml]

Error: Failed to download metadata for repo 'rhel9': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
1

There are 1 best solutions below

0
On

Installing the file should create a createrepo_c file. Run

find / -name 'createrepo*'

When you find it run

/path/to/file/createrepo_c .

You should see:

Directory walk started
Directory walk done - 6729 packages
Temporary output repo path: ./.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished