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
asked 25 days ago167 views
1 Answer
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
EXPERT
answered 25 days ago
profile picture
EXPERT
reviewed 25 days ago
  • 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"

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions