0

I am trying to updating my packages by using the command, reposync which download from the RHN (Red Hat Network). So I create a local mirror of the latest update for Red Hat Enterprise Linux 5, 7.5. Here is the link, https://access.redhat.com/solutions/23016 I set up the local repo using the iso file.

This is my local.repo

[LocalRepo]
name=Red Hat Enterprise Linux 7.5
baseurl=file://mnt
enabled=1
gpgcheck=0

Here is the yum repolist output

repo id    repo name                  status

LocalRepo  Red Hat Enterprise Linux 7.5 5099

I set up the required package

 yum install yum-utils createrepo

Then I used the command

 reposync --gpgcheck -l --repoid=LocalRepo --download_path=/var/yvmdi

and even this command

 reposync  --repoid=LocalRepo --download_path=/var/yvmdi

The result failed as the result shows all the rpm package failed and also states multiples times no more mirrors to try.

Rpm package failed

Rpm package failed

No more mirrors to try

No more mirrors to try

The reason why I am doing this is that some of the package require the latest patch thus, I use reposync to get new updates from Red Hat Network. Can you kindly assist this problem? Thanks you.

chicks
  • 3,639
  • 10
  • 26
  • 36

4 Answers4

0

I know its a bit late, but for others with the same problem use sudo when running almost anything yum related, including reposync.

sudo reposync --gpgcheck -l --repoid=LocalRepo --download_path=/var/yvmdi
Tom
  • 101
  • Would a failure to run `reposync` without root privileges produce the error output provided in the question, though? – womble Feb 25 '20 at 00:56
  • It did for me. In my experience yum does not provide great errors when run without proper permissions. – Tom Feb 27 '20 at 15:06
  • I am already running reposync as root and still encountering the `FAILED` and `No more mirrors to try` messages. – duct_tape_coder Jan 12 '22 at 22:24
0

clear cache or delete yum cache directory every time you run reposync

0

After some searching, I found this article (https://bgstack15.wordpress.com/2019/05/05/reposync-fails-no-more-mirrors-to-try/) which suggested deleting some of the affected files in the repo.

So I removed the files (rm -f openscap*) in the 'updates' Packages directory (13 removed) and on the next sync I got no errors for those packages (13 downloaded).

Repeat for any remaining errors and Bob's your uncle.

duct_tape_coder
  • 755
  • 3
  • 12
0

Sorry to not directly answering your question, but given what you want to do, I'm positive that you will be happier with Foreman (or RHEL Satellite Server, if you want to buy the product) - it takes care of inventory, mirroring packages from Redhat and other repos, releasing and overriding package versions to your environment, hosting you own package repos, handling bare-metal and VM provisioning, proxying licensing for RHEL.

Plus, it's useful as a Puppet master and ENC.

I used to mess with mrepo when RHN was still a thing, but having Foreman, I never looked back.

fuero
  • 9,413
  • 1
  • 35
  • 40