我无法在Google Cloud Engine上安装Java-7。最初,我添加了一个ppa存储库:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update得到了这个:
Hit http://ftp.debian.org wheezy-backports/non-free Translation-en/DiffIndex
Err http://ppa.launchpad.net wheezy/main Sources
404 Not Found
Err http://ppa.launchpad.net wheezy/main amd64 Packages
404 Not Found
Ign http://ppa.launchpad.net wheezy/main Translation-en
Fetched 473 B in 2s (236 B/s)
W: GPG error: http://www.duinsoft.nl debs Release: The following signatures couldn't be
verified because the public key is not available: NO_PUBKEY E18CE6625CB26B26
W: Failed to fetch
http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/wheezy/main/source/Sources 404
Not Found
W: Failed to fetch
http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/wheezy/main/binary-amd64/Packages
404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used
instead.以确定apt-get update不工作的原因。我删除了/etc/apt/sources.list.d/ webupd8team-java-wheezy.list,然后运行apt-get update。一切都很好!
现在,有没有其他方法可以使用CLI在远程机器上安装java-7。我用谷歌搜索了一下,但没有找到任何相关信息(除了手动安装java-7 )。
发布于 2014-08-04 19:09:39
如果您对使用Java7没有特殊要求,那么可以在Debian版本中安装带有webupd8 repository的Java8。不过,这些步骤与您在Java7版本中遵循的步骤有很大不同。
您可能知道,安装了JDK 8并不意味着您的应用程序需要与JRE 8兼容:您可以随时在Eclipse (或IDE)中设置兼容级别。
https://stackoverflow.com/questions/25116658
复制相似问题