1

I have .deb package when I try to install it with Gdebi it return: Error dependency is not satisfiable openjdk-7 jre

I have openjdk-8 jre installed but it still appeared

referring to How do I install openjdk 7 on Ubuntu 16.04 or higher? I have tried this:

sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update   
sudo apt-get install openjdk-7-jdk  

but it can't install openjdk-7 jre

I have Ubuntu 17.04

What should I do?

Khalil
  • 11

1 Answers1

0

You can still install this using the deb file. It just takes a second command.

  1. Open Terminal
  2. Type:

sudo dpkg -i /path/to/deb/file

For example:

sudo dpkg -i /Downloads/openjdk-7-jdk_7u131-2.6.9-0ubuntu0.14.04.2_amd64.deb
  1. Then type:

sudo apt-get install -f

This will install any dependencies you need.

Openjdk 7 should now be installed. In order to have your system use Openjdk 7 as default, you will need to run the following command in the terminal:

sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

I hope this helps!