While using localinstall with rpm files with dependencies also locally present, redirecting to mirrors list, and getting as there was no network, but with network as well sometime it failed.
Rocky linux version 8.7
Can anyone please guide me fix this issue to localinstall should look locally, not look on internet to download
Already tested on redhat 8.7 and localinstall does not require internet if all dependant rpm are present
Got the reason of the issue.
When i have disabled the repo on rocky , it was looking locally only and that have fixed my issue.
In redhat repo is already disabled so did not get the issue their
It is for air gap environment where internet will not be there.
So all the rpm packages are locally downloaded and the it will be installed through dnf localinstall *.rpm
As the repo were enabled so it is redirecting to mirror lists and as network was not there it is throwing error.
So disabled the repo and then it didn’t go to mirror list
You could use createrepo_c to generate repo metadata from those packages.
Then define a repo (in /etc/yum.repos.d/) that points to your local repository path.
As I said earlier, the dnf localinstall *.rpm is exactly same as dnf install *.rpm
and dnf --disablerepo=* install *.rpm is ad hoc “install without repos”, while dnf config-manager --disable baseos appstream extras disables those three repos.