AWS 上的 Ec2 实例 apt- 无法正常工作 [英] Ec2 instance on AWS apt- get not working
问题描述
我在 AWS 上有 Ec2 实例和 Amazon Ubuntu.
I have Ec2 instance on AWS with Amazon Ubuntu.
当我尝试下载任何东西时,我无法这样做.
When i try to download any thing, I am unable to do so.
例如:
~# apt-get update
0% [Connecting to ap-southeast-1.ec2.archive.ubuntu.com (103.246.148.161)] [Connecting to security.ubuntu.com (91.189.91.15)
另一个前任是
~# wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
--2014-04-09 07:27:17-- https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
Resolving s3.amazonaws.com... 207.171.189.80
Connecting to s3.amazonaws.com|207.171.189.80|:443...
这将永远存在.
在我为 AWS 控制台创建组和用户之前,我能够下载文件.
I was able to download files until I created Group and user for AWS Console.
请提出这里可能存在的问题.
Please suggest what can be issues here.
推荐答案
您的 EC2 实例的安全组未配置为使其访问 Internet.对于所有流量
到0.0.0.0/0
,您需要有一个出站规则
.在 EC2-Classic
中,这已经到位,因此您不必担心.但是,如果这是在VPC中,则需要添加此规则.
You EC2 instances's Security groups is not configured to let it reach internet. You need to have an Outbound rule
for all traffic
to 0.0.0.0/0
. In EC2-Classic
, this is already in place and hence you need not worry. However, if this is in VPC, then you need to add this rule.
另外,除了上面所说的,你能不能检查一下是否有任何iptables
规则导致了任何问题.
Also, Apart from what is said above, could you check whether any iptables
rules causing any issue.
这篇关于AWS 上的 Ec2 实例 apt- 无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!