简体   繁体   English

无法在Debian机器上安装Java-7

[英]Not able to install Java-7 on Debian machine

I am not able to install Java-7 on Google Cloud Engine . 我无法在Google Cloud Engine上安装Java-7 Initially i added a ppa repository: 最初,我添加了一个ppa存储库:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

Got this: 收到:

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.

To make sure why apt-get update is not working. 确保为什么apt-get update无法正常工作。 I removed /etc/apt/sources.list.d/ webupd8team-java-wheezy.list and then run apt-get update . 我删除了/etc/apt/sources.list.d/ webupd8team-java-wheezy.list ,然后运行apt-get update Everything works fine! 一切正常!

Now, Is there any other way to install java-7 on remote machine using CLI . 现在,是否还有其他方法可以使用CLI在远程计算机上安装java-7 I googled but didn't find any relevant info upon it (except installing java-7 manually). 我用谷歌搜索,但没有找到任何相关信息(手动安装java-7除外)。

If you don't have an specific requirement to use Java 7 you could install Java 8 with the webupd8 repository in you Debian version. 如果您没有使用Java 7的特定要求,则可以在Debian版本中将 Java 8与webupd8存储库一起安装。 The steps are quite different from the ones you followed for the Java 7 version, though. 但是,这些步骤与您为Java 7版本执行的步骤完全不同。

As you probably know, having JDK 8 installed doesn't mean your application needs to be JRE 8 compliant: you can set the compliance level in Eclipse (or your IDE) at any time. 如您所知,安装JDK 8并不意味着您的应用程序需要符合JRE 8:您可以随时在Eclipse(或IDE)中设置合规性级别。

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

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