Just a quick note if you’re having trouble installing the openjdk-8-jre-headless package on Ubuntu.
I found that I kept getting an “Unable to locate package openjdk-8-jre-headless” error when using apt-get install.
Turns out that the openjdk-8 package is in the Universe repository - which wasn’t enabled by default in the package manager sources list.
To resolve this issue, do the following from a terminal window:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless
fails, you need to install the package lsb-release
sudo apt-get install lsb-release
and then re-run the sudo add-apt-repository commands.
Good catch; but the Universe repository is enabled by default on a fresh install, isn’t it?
(We’ve made multiple fresh install tests, including Ubuntu 15.10, and except for versions < 14.10, there was nothing to add in order to be able to install openjdk-8-jre-headless)
No problems - I was confused and it took me a little while to figure out why the install was failing.
That was my understanding too - but apparently not on the livecd image I have here.
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 15.10
and the contents of /etc/apt/sources.list
deb cdrom:[Ubuntu 15.10 _Wily Werewolf_ - Release amd64 (20151021)]/ wily main restricted
deb http://archive.ubuntu.com/ubuntu/ wily main restricted
deb http://security.ubuntu.com/ubuntu/ wily-security main restricted
deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted
Hi guys, I’d tried to do so following these instructions you’ve provided here, but in my very case this solution appears to be not working. Maybe the point is I’ve changed the Ubuntu local server not so long ago, and now I don’t know what to do with this - majority of my default software is refusing to update with error stand for “Failed to parse repository” or soething, and so on. Actually, I’m quite new to java (new-new, just 2 months have passed, to be frank) and had some problems with installing JDK from Windows as well, right before a friend of mine, who is sort of my mentor with that, suggested to browse this website with materials on how to learn java https://explainjava.com/category/java/ and there I found some instructions for several cases when manual installation goes wrong. Nevertheless, it doesn’t work in this case with Ubuntu, and many other applications as well. I’d never used UNIX-systems before, have I done something wrong?