0

I am using Oracle VM Virtual Box (Version 5.1.18) to run Ubuntu 16.04. I am using proxy server . I have configured proxy settings in apt.conf and apt.config.In both these files my http proxy is set with username,password,host,address and my net is working fine. I have been able to install openjdk-8 version. My jdk version is

openjdk version "1.8.0_131"    
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)    
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

I am trying to install java 8 using command

sudo apt-get install oracle-java8-installer

But this is the error I am getting

Package oracle-java8-installer is not available, but is referred to by another package.    
This may mean that the package is missing, has been obsoleted, or
is only available from another source    
E: Package 'oracle-java8-installer' has no installation candidate

Somewhere I read I need to use command sudo apt install snapd

but this is the error it is showing

Setting up snapd (2.26.10~14.04) ...    
Failed to execute operation: No such file or directory    
dpkg: error processing package snapd (--configure):    
 subprocess installed post-installation script returned error exit status 1    
dpkg: dependency problems prevent configuration of snap-confine:
 snap-confine depends on snapd (= 2.26.10~14.04); however:
  Package snapd is not configured yet.

dpkg: error processing package snap-confine (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of ubuntu-core-launcher:    
 ubuntu-core-launcher depends on snap-confine (= 2.26.10~14.04); however:

  Package snap-confine is not configured yet.

dpkg: error processing package ubuntu-core-launcher (--configure):    
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:

 snapd    
 snap-confine    
 ubuntu-core-launcher

E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be appreciated I have been trying to install java past 1 day but couldn't.

EDIT

Also while using sudo add-apt-repository ppa:webupd8team/java.This error-

Cannot add PPA: 'ppa:~webupd8team/ubuntu/java'.
ERROR: '~webupd8team' user or team does not exist.

I have referred to this link Oracle-Java8-Installer: No installation candidate.

In first answer in this link there is no such file as webupd8team-java.list in /etc/apt/sources.list.d

While in second answer this command sudo apt-get install python-software-properties produces the same error as sudo apt install snapd

 Failed to execute operation: No such file or directory
 dpkg: error processing package snapd (--configure):
 subprocess installed post-installation script returned error exit status 1
 dpkg: dependency problems prevent configuration of snap-confine:
 snap-confine depends on snapd (= 2.26.10~14.04); however:
 Package snapd is not configured yet.

dpkg: error processing package snap-confine (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-core-launcher:
ubuntu-core-launcher depends on snap-confine (= 2.26.10~14.04); however:
Package snap-confine is not configured yet.

dpkg: error processing package ubuntu-core-launcher (--configure):
dependency problems - leaving unconfigured
Setting up python-apt (1.1.0~beta1build1) ...
No apport report written because the error message indicates its a followup 
error from a previous failure.
                      No apport report written because the error message 
indicates its a followup error from a previous failure.
Setting up python-pycurl (7.43.0-1ubuntu1) ...
Setting up python-software-properties (0.96.20.7) ...
Errors were encountered while processing:
snapd
snap-confine
ubuntu-core-launcher
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ash
  • 1
  • 2
  • 1
    https://askubuntu.com/questions/790671/oracle-java8-installer-no-installation-candidate – g_p Aug 09 '17 at 05:42
  • @g_p Read my edit – Ash Aug 09 '17 at 07:05
  • my be it is because of proxy. https://askubuntu.com/questions/452595/cannot-add-ppa-behind-proxy-ubuntu-14-04 – g_p Aug 09 '17 at 09:00
  • 1
    @g_p After using that now I can create ppa but coudnt install java using sudo apt-get install oracle-java8-installer . The error is same as stated above. – Ash Aug 09 '17 at 17:49

0 Answers0