Error downloading metadata for repository 'AmazonLinux'

211 Views Asked by At

I am using

amazoncorretto:17.0.9-al2023 

image and while performing "dnf install unzip" I get the below error:

Error downloading metadata for repository 'AmazonLinux', Curl error (6): couldn't resolve host name for https://cdn.amazonlinux.com/al2023/core/mirros/2023.3.20240131/x86-64/mirror.list Ignoring repositories: amazonlinux

  • dnf update
  • different amazoncorretto al2023 images
1

There are 1 best solutions below

0
On

Please run "curl -I cdn.amazonlinux.com" from within the server and see if there's an issue with dns resolution. If that's the case you may try google public dns (8.8.8.8/8.8.4.4) as the resolver IPs in /etc/resolv.conf

% curl -I cdn.amazonlinux.com
HTTP/1.1 403 Forbidden
Content-Type: application/xml
Connection: keep-alive
x-amz-bucket-region: us-west-2
Date: Thu, 29 Feb 2024 14:22:22 GMT
Server: AmazonS3
X-Cache: Error from cloudfront
Via: 1.1 c640b1afa51b342db4c4d96d404a1eda.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: IAD79-C2
X-Amz-Cf-Id: UBvJ5lXzfvTS24cf-1i19eQ31tMfXZSWFx7Ff3EjDLn3pczrMHjOHQ==