无法使用ec2实例中的wget

时间:2017-11-24 07:59:20

标签: amazon-web-services amazon-ec2 wget amazon-vpc

我正在尝试从ec2实例下载一些软件包。但它没有用。例如,当我尝试下载elasticsearch时,它会暂停此消息

$wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.4.0.tar.gz
--2017-11-24 07:51:29--  https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.4.0.tar.gz
Resolving download.elastic.co (download.elastic.co)... 23.21.118.61, 54.225.188.6, 54.235.82.130, ...
Connecting to download.elastic.co (download.elastic.co)|23.21.118.61|:443..

但同样在我的电脑上工作。我能够从ec2实例ping。

$ping google.com
PING google.com (172.217.3.206) 56(84) bytes of data.
64 bytes from sea15s12-in-f14.1e100.net (172.217.3.206): icmp_seq=1 ttl=46 time=7.06 ms
64 bytes from sea15s12-in-f14.1e100.net (172.217.3.206): icmp_seq=2 ttl=46 time=7.10 ms
64 bytes from sea15s12-in-f14.1e100.net (172.217.3.206): icmp_seq=3 ttl=46 time=7.12 ms

我没有在aws中使用vpc。这是我从cloudformation模板部署的单个ec2实例。

编辑:1

我使用了弹性IP。当我不使用弹性IP时,我在安装nginx时会出现以下错误,

================================================================================
 Package              Arch        Version                  Repository      Size
================================================================================
Installing:
 nginx                x86_64      1:1.12.1-1.33.amzn1      amzn-main      561 k
Installing for dependencies:
 gperftools-libs      x86_64      2.0-11.5.amzn1           amzn-main      570 k
 libunwind            x86_64      1.1-10.8.amzn1           amzn-main       72 k

Transaction Summary
================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 1.2 M
Installed size: 2.9 M
Downloading packages:
http://packages.us-west-2.amazonaws.com/2017.09/main/154a6dd467e2/x86_64/Packages/gperftools-libs-2.0-11.5.amzn1.x86_64.rpm?instance_id=i-0d2c49307ac221d88&region=us-west-2: [Errno 12] Timeout on http://packages.us-west-2.amazonaws.com/2017.09/main/154a6dd467e2/x86_64/Packages/gperftools-libs-2.0-11.5.amzn1.x86_64.rpm?instance_id=i-0d2c49307ac221d88&region=us-west-2: (28, 'Connection timed out after 10001 milliseconds')
Trying other mirror.
http://packages.us-west-1.amazonaws.com/2017.09/main/154a6dd467e2/x86_64/Packages/gperftools-libs-2.0-11.5.amzn1.x86_64.rpm?instance_id=i-0d2c49307ac221d88&region=us-west-2: [Errno 12] Timeout on http://packages.us-west-1.amazonaws.com/2017.09/main/154a6dd467e2/x86_64/Packages/gperftools-libs-2.0-11.5.amzn1.x86_64.rpm?instance_id=i-0d2c49307ac221d88&region=us-west-2: (28, 'Connection timed out after 10001 milliseconds')
Trying other mirror.

有人可以帮我解决这个问题吗?

0 个答案:

没有答案