Could not retrieve mirrorlist HTTPS Error 403 - Forbidden

0

to install pip i needed python 3 because i had errors with python 2 so i changed the symlink of python -> python 2 to python -> python 3 and now i no longer can use yum. Yum has been uninstalled and i don't know what to do i am a beginner.

I changed Python symlink which was

lrwxrwxrwx 1 root root 7 Apr 3 15:10 /usr/bin/python -> python2

to

lrwxrwxrwx 1 root root 7 Apr 3 15:10 /usr/bin/python -> /usr/bin/python3

with the command

$ sudo ln -sf /usr/bin/python3 /usr/bin/python"

Because i needed python version =>3 to install pip.

I already tried to put the symlink back as it was before with python2 but it doesn't change anything yum has been desinstalled i don't know how.

When i try to do:

$ sudo yum update

sudo: yum: command not found or $ whereis yum yum: /etc/yum or $ rpm -q yum package yum is not installed

I tried that:

$ sudo rpm -ivh yum-3.4.3-168.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

Now yum is recognized but i always get an error (see screenshots).

I don't know how to solve the problem, please if someone could help me it would be nice of you.

sudo rpm -ivh yum... sudo yum update

Hugo
질문됨 한 달 전178회 조회
1개 답변
0

Hello.

Are you using VPC endpoints to access S3?
If you are using a VPC endpoint, try configuring the VPC endpoint policy to allow connection to the S3 bucket that is the Amazon Linux 2 repository.
https://repost.aws/knowledge-center/ec2-troubleshoot-yum-errors-al1-al2

profile picture
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
  • I don't think i'm using endpoint to access S3, i don't remember configuring it, i'm using a network gateway.

  • By the way, it seems that you are accessing an S3 bucket in eu-west3, but does it match the region where EC2 is running? If they do not match, try changing the region listed in the file below to the region where EC2 is running.

    /etc/yum/vars/amazonlinux
    
  • This is already "amazonlinux-2-repos-eu-west-3.s3.dualstack" in "/etc/yum/vars/amazonlinux"

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

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

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

관련 콘텐츠