简体   繁体   中英

Not able to install Java-7 on Debian machine

I am not able to install Java-7 on Google Cloud Engine . Initially i added a ppa repository:

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. I removed /etc/apt/sources.list.d/ webupd8team-java-wheezy.list and then run apt-get update . Everything works fine!

Now, Is there any other way to install java-7 on remote machine using CLI . I googled but didn't find any relevant info upon it (except installing java-7 manually).

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. The steps are quite different from the ones you followed for the Java 7 version, though.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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