Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been been running trusty since the first alpha release, pulling daily updates. I also installed the oracle-java7-installer from the WebUpd8 PPA. Today I noticed during a dist-upgrade that oracle-java7-installer was being removed. On my edge system I just allow all the defaults so I allowed the removal expecting to try out the java 8 version anyway. However when I went to install the oracle-java8-installer package it wanted to remove "apt"!? This obviously sparked my concern, as it even feels like a security concern. Help understanding this would be greatly appreciated.

$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho
The following packages will be REMOVED:
  apt apturl nautilus-share python3-software-properties software-center software-properties-common software-properties-gtk
  ubuntu-extras-keyring ubuntu-minimal unattended-upgrades
The following NEW packages will be installed:
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
0 upgraded, 1 newly installed, 10 to remove and 0 not upgraded.
Need to get 18.7 kB of archives.
After this operation, 7,838 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
share|improve this question

closed as off-topic by Braiam, Rafał Cieślak, chronitis, Lucio, BuZZ-dEE Apr 7 '14 at 17:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Braiam, Rafał Cieślak, chronitis, Lucio, BuZZ-dEE
If this question can be reworded to fit the rules in the help center, please edit the question.

@AvinashRaj: I think he knows that. :) @Lance: I suspect it was something in the apt-get dist-upgrade that is causing this problem, as the installer package has very few dependencies and one conflict, and oracle-java7-installer shouldn't have been removed. – saiarcot895 Apr 4 '14 at 16:28
Try to hold all the important packages shown above and then try to install oracle-java8-installer package. – Avinash Raj Apr 4 '14 at 16:33
@AvinashRaj: j2se-common – saiarcot895 Apr 4 '14 at 16:35
This should not occur, please report a bug. – Braiam Apr 4 '14 at 21:28
Moderator. This issue is on topic and is directly related to Ubuntu. Also a bug was reported almost immediately upon me asking the question. I am an active participant in the Ubuntu and StackExchange communities. I asked this question wishing to learn from my peers about and aspect of Ubuntu development. I submit that the very nature of this question is the reason this site exists. I investigated the help center rules and this question is within the guidelines. In my opinion placing questions such as these on hold actively discourages involvement in the community. Please reconsider. – Lance Caraccioli Apr 8 '14 at 21:11
up vote 8 down vote accepted

This recent change referenced in the 'apt' package ChangeLog appears to be the likely culprit:

apt ( trusty; urgency=low

  Cherry pick fixes from the apt 1.0 branch:

  [ Michael Vogt ]
  * add sun-java{5,6}-jdk to breaks/replaces as that provided a "apt"
    binary as well

The oracle-java8-installer package "Provides" the "sun-java6-jdk" package, so this conflict bubbles up and prevents us from installing the WebUpd8 packages -- even though neither oracle-java7-installer nor oracle-java8-installer actually installs the problematic "apt" binary mentioned in the apt changelog.

I went ahead and submitted a bug report for this:

share|improve this answer
thanks for the bug report. – Lance Caraccioli Apr 4 '14 at 22:14

Andy S has the underlying problem here and I'd expect a fix out soon. Please use the bug report link he provided and indicate that it also affects you so that it gains higher priority.

If you absolutely can't wait, here's a temporary workaround to ignore the dependency issues and force the install:

  • Download the .deb package from apt sudo apt-get download oracle-java7-installer

  • Do the install of the .deb you just downloaded, ignoring any dependencies apt complains about: sudo dpkg -i --ignore-depends=apt file-you-just-downloaded.deb

Two items of note:

  1. you can use this similarly for Java 8 by changing the commands above accordingly.
  2. For at least the time being, your apt will think it has a broken dependency and request removing oracle-java7-installer. You can revert back by using apt-get -f install.
share|improve this answer

Another workaround until this gets fixed is to modify the deb file from webupd8 and remove sun-java6-jdk from the Provides line in the deb control file. There's a handy script in this answer on Just grab the original file, run the script on it, modify the Provides line and install the modified file with sudo dpkg -i.

I uploaded the modified package, but I highly suggest to use the original file and do the modification yourself, since you shouldn't install stuff by random people on the internet ;)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.