Ec2 instance on AWS apt- get not working

前端 未结 5 1840
小鲜肉
小鲜肉 2020-12-14 17:21

I have Ec2 instance on AWS with Amazon Ubuntu.

When i try to download any thing, I am unable to do so.

For Ex:

~# apt-get update

0% [Connect         


        
5条回答
  •  Happy的楠姐
    2020-12-14 17:52

    I figured out how to get apt-get to work again.

    Edit gai.conf:

    sudo vim /etc/gai.conf

    change line ~54 to uncomment the following:

    precedence ::ffff:0:0/96 100

    write and quit:

    :wq

    CAUTION

    Look out line 50 which looks almost identical:

    precedence ::ffff:0:0/96 10

    This is the wrong line. Go ~4 lines down and you'll find the correct line to uncomment because it ends with 100 instead of 10

提交回复
热议问题