Search code examples
nginxrhel

Error unable to run dnf localinstall *.rpm


I am trying to install Nginx on my rhel 8.7. I am not able to run dnf localinstall *.rpm on a non-internet environment and it is showing some errors.

I tried check the /etc/yum.repos.d directory but not sure what to do. Please advise.


Solution

  • I suggest you to check your /etc/yum.repos.d and check if there are any repo files in the directory. If there are, try to edit the repo files and change the gpgcheck=0 and type in the terminal:

    1. yum repolist
    2. yum list
    3. Try to run dnf localinstall *.rpm again.

    It should work now.