oracle-java8-installer results in "apt" removal? [closed]
Solution 1:
This recent change referenced in the 'apt' package ChangeLog appears to be the likely culprit:
apt (0.9.15.4ubuntu4) 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: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1302736
Solution 2:
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:
- you can use this similarly for Java 8 by changing the commands above accordingly.
- 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
.
Solution 3:
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 superuser.com. 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 ;)