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?

1 Answer 1


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!

  • after downloading deb file and running sudo dpkg -i retutns an error maybe because one of the dependencies is unavailable thanks
    – Khalil
    Jun 13, 2017 at 15:33
  • It will return an error. You then need to run the command in step 3 of my post. That will take care of any dependencies that are needed.
    – Mark Lines
    Jun 13, 2017 at 15:35
  • that doesn't help
    – Khalil
    Jun 28, 2017 at 16:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .