gpt4 book ai didi

EC2 中的 Java 安装

转载 作者:行者123 更新时间:2023-12-04 18:31:43 24 4
gpt4 key购买 nike

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

程序“java”可以在以下包中找到:
* 默认 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 更新
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]

阅读包裹 list ...完成

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 时也会遇到类似的问题吗?

谢谢

最佳答案

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

尝试 ping 到某个 Internet 地址,看看它是否工作。一旦解决了,它应该可以正常工作。

关于EC2 中的 Java 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48050572/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com