繁体   English   中英

EC2中的Java安装

[英]Java installation in EC2

我正在设置用于学习目的的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:某些索引文件下载失败。 它们已被忽略,或改用旧的。

我现在应该怎么办 ?

在installin hadoop中我也会遇到类似的问题吗?

谢谢

看来您的EC2实例的出站Internet访问被某种方式阻止。 它可以是安全组/ ACL / VPN设置。

尝试ping到某个Internet地址,然后查看其是否有效。 解决后,它应该可以正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM