How to update "amzn2-core/2/x86_64"

0

Du[ec2-user@ip-172-31-81-240 ~]$ sudo yum update Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Could not retrieve mirrorlist https://amazonlinux-2-repos-us-east-1.s3.dualstack.us-east-1.amazonaws.com/2/core/latest/x86_64/mirror.list error was 14: curl#77 - "error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none" yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: amzn2-core/2/x86_64"

One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:e to some reasons I went on to delete mod_ssl and later on when I tried to install again Mod_ssl I get bunch of errors I tried to troubleshoot them and in that process I suppose I deleted the "amzn2-core/2/x86_64" repo, now when I just do sudo yum update I get this error

" I have tried enabling the repo but no help. I can't run sudo yum update successfully. Please suggest how to update the repo or remove the error.

profile picture
Gopal
질문됨 10달 전1210회 조회
1개 답변
0

It's likely to be one of the items in this knowledge article https://repost.aws/knowledge-center/ec2-troubleshoot-yum-errors-al1-al2

My best guess would be that the EC2 instance doesn't have outbound access on ports 80 & 443 in a security group that is associated with it. Can you verify these outbound ports are open?

If this doesn't solve the problem then look at the route table. Is the EC2 instance provisioned in the default VPC, or a VPC you have created? If the EC2 is in the default VPC then is it in a pre-existing subnet, or in a subnet you have created?

If it's in a pre-existing subnet in the default VPC then the routing should be fine, so look at other possibilities in the knowledge article.

If it's in a new subnet and/or new VPC then make sure the subnet has a route directly to an internet gateway, in AWS Console -> VPC -> Subnets -> [subnet] -> Route table and it needs to have an entry for destination 0.0.0.0/0 with target igw-abcd1234 (or if you're using a NAT Gateway then ensure this is properly setup).

Once this is confirmed to be in place, if you still can't yum update then I would advise working through the other steps in the linked knowledge article.

profile picture
전문가
Steve_M
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인