【问题标题】:Stuck at Connecting to us-west-2.ec2.archive.ubuntu.com in amazon ec2卡在连接到亚马逊 ec2 中的 us-west-2.ec2.archive.ubuntu.com
【发布时间】:2016-04-30 15:52:48
【问题描述】:

我正在使用亚马逊 aws ec2 实例。我创建了一个实例。我有一个密钥对,并使用它通过 ubuntu 登录。现在,我正在尝试在远程服务器上运行sudo apt-get update。我得到的是:

ubuntu@ip-172-31-30-46:~$ sudo apt-get update
Err http://us-west-2.ec2.archive.ubuntu.com trusty InRelease                   

Err http://us-west-2.ec2.archive.ubuntu.com trusty-updates InRelease           

Err http://us-west-2.ec2.archive.ubuntu.com trusty-backports InRelease         

Err http://us-west-2.ec2.archive.ubuntu.com trusty Release.gpg                 
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
Err http://us-west-2.ec2.archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
Err http://us-west-2.ec2.archive.ubuntu.com trusty-backports Release.gpg
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
0% [Connecting to security.ubuntu.com (91.189.91.15)]

我认为互联网无法在我的服务器上运行。谷歌搜索后,我得到了以下解决方案: Ec2 instance on AWS apt- get not working,但它已在我的实例中配置。请帮我解决这个问题。

【问题讨论】:

  • 您是如何设置此 EC2 实例的 Internet 访问权限的?在具有 Internet 网关 + 公共 IP 的 VPC 中,在具有 NAT 的 VPC 私有子网中?

标签: linux ubuntu amazon-web-services amazon-ec2


【解决方案1】:

我会建议您检查您的防火墙设置。您可能已设置拒绝所有传出连接。

sudo ufw default allow outgoing

这将允许连接到外部服务器

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-19
    • 2015-10-22
    • 2015-01-23
    相关资源
    最近更新 更多