坚持在亚马逊ec2连接到us-west-2.ec2.archive.ubuntu.com

时间:2016-01-24 09:06:51

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

我正在使用amazon 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,但它已在我的实例中配置。请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

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

sudo ufw default allow outgoing

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