• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

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?


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

1 Solution
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

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

How did you install in the first place. What package are you trying to install? It should be either openjdk-8-jdk or
nappy_dThere are a 1000 ways to skin the technology cat.Author Commented:
Thanks that was the fix :).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now