Trying to Install OpenJDK Package 'openjdk-7-jre' has no installation candidate [duplicate]
I have just Updated to the new Ubuntu 16.04. This is a fresh installation of this OS. Trying to install Openjdk 7 but I got this error.
Package 'openjdk-7-jre' has no installation candidate
how do I fix it?
12 Answers
if you really want to install JDK7, add these in your /etc/apt/sources.list file,
deb trusty main restricted universe multiverse
deb trusty-security main restricted universe multiverse
deb trusty-updates main restricted universe multiverse
deb trusty-proposed main restricted universe multiverse
deb trusty-backports main restricted universe multiverseby issuing a following command,
sudoedit /etc/apt/sources.listthen run,
sudo apt-get updaterun apt-cache search openjdk-7-jre to verify.
- Go to the download page
- Download the rpm
- alien it
alien jdk-7u80-linux-x64.rpm
- install it
dpkg -i jdk_1.7.080-1_amd64.deb