EC2中的Java安装

问题描述 投票:2回答:1

我正在设置一个用于学习目的的hadoop集群。为此我尝试安装java并在安装之前通过运行java -version命令检查了之前安装的java并获得了以下消息

程序'java'可以在以下包中找到:* default-jre * gcj-5-jre-headless * openjdk-8-jre-headless * gcj-4.8-jre-headless * gcj-4.9-jre-headless * openjdk-9-jre-headless试试:sudo apt install

根据其中一个主题中的建议,我运行sudo apt-get update并重复获得以下消息

$ sudo apt-get update 0%[连接到ap-south-1.ec2.archive.ubuntu.com(54.168.13.207)]

错误:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:80(54.248.192.197),连接超时[IP:54.248.192.197 80]

错误:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:http:[IP:54.248.192.197 80]

错误:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:http:[IP:54.248.192.197 80]

错误:4 http://security.ubuntu.com/ubuntu xenial-security InRelease无法启动与security.ubuntu.com:80(2001:67c:1562 :: 19)的连接。 - 连接(101:网络无法访问)[IP:2001:67c:1562 :: 19 80]

阅读包裹清单......完成

W:无法获取http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial/InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:80(54.248.192.197),连接超时[IP:54.248.192.197 80]

W:无法获取http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:http:[IP:54.248.192.197 80]

W:无法获取http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease无法连接到ap-south-1.ec2.archive.ubuntu.com:http:[IP:54.248.192.197 80]

W:无法获取http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease无法启动与security.ubuntu.com:80(2001:67c:1562 :: 19)的连接。 - 连接(101:网络无法访问)[IP:2001:67c:1562 :: 19 80]

W:某些索引文件无法下载。它们被忽略了,或者使用了旧的。

我现在应该怎么做 ?

我也会在安装hadoop时面临类似的问题吗?

谢谢

java ubuntu amazon-ec2 hadoop2
1个回答
0
投票

看起来您的EC2实例的出站互联网访问被某些东西阻止了。它可以是安全组/ ACL / VPN设置。

尝试ping一些互联网地址,看看它是否正常工作。一旦解决了,它应该可以正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.