Monday, December 5, 2022

Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8]

 When I tried to run "yum install certbot" on my Oracle linux 8 VM. I got the following error


Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8]


How to fix this?

vi /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

Open the file https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 in a browser and copy paste the content on the path /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

Now your yum will work. :)