Link to home
Start Free TrialLog in
Avatar of Irwin W.
Irwin W.Flag for Canada

asked on

Java 8 install issues on Debian

I have Debian cloud server that I am trying to upgrade to use Java 8.

I am getting these errors but even when I try to upgrade and add the dependencies, further errors occur.

Can anyone let me know what command I can use to install Java 8 and all dependencies?

Thanks!

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 java-package : Depends: debhelper (>= 9) but it is not going to be installed
                Depends: dpkg-dev but it is not going to be installed
                Depends: fakeroot
                Depends: libasound2
                Recommends: gcc but it is not going to be installed
 libc-bin : Depends: libc6 (< 2.20) but 2.27-2 is to be installed
 locales : Depends: libc-bin (> 2.27) but 2.19-18+deb8u10 is to be installed
           Depends: libc-l10n (> 2.27) but it is not going to be installed
 unifi : Depends: java8-runtime-headless
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Open in new window

Avatar of remeshk
remeshk
Flag of United States of America image

One possible cause of unmet dependencies could be corrupted package database, and/or some packages weren’t installed properly. To fix this problem, hit Alt+Ctrl+T to open terminal and try to run one of the following commands:

sudo apt-get clean
or,

sudo apt-get autoclean
apt-get clean clears out the local repository of retrieved package files (the .deb files). It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. apt-get autoclean clears out the local repository of retrieved package files, but unlike apt-get clean, it only removes package files that can no longer be downloaded, and are largely useless.

One of the most basic fixes to resolve dependencies problems is to run:

sudo apt-get -f install
The -f here stands for “fix broken”. Apt will attempt to correct broken dependencies. If you manually installed a package that had unmet dependencies, apt-get will install those dependencies, if possible, otherwise it may simply remove the package that you installed in order to resolve the problem.

Then run:
sudo dpkg --configure -a
Then run this again:
sudo apt-get -f install


https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Irwin W.

ASKER

Thanks that was the fix :).