I need to install Java jdk 11 on my lubuntu laptop, but when I write this in the terminal: sudo apt-get install oracle-java11-installer I get this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
google-chrome-stable : Depends: libappindicator3-1 but it is not going to be installed
oracle-java11-installer : Depends: java-common (>= 0.24) but it is not going to be installed
Recommends: gsfonts-x11 but it is not going to be installed
Recommends: oracle-java11-set-default but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
and
> Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
google-chrome-stable : Depends: libappindicator3-1 but it is not going to be installed
openjdk-11-jre-headless : Depends: ca-certificates-java but it is not going to be installed
Depends: java-common (>= 0.28) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
for sudo apt install openjdk-11-jre-headless
How do I fix this?
when i tried fix broken install I got this
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I don't really care if I get open or oracle java, I just need to install jdk.
I have Lubuntu 18.10
when using sudo apt install I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
google-chrome-stable : Depends: libappindicator3-1 but it is not going to be installed
oracle-java11-installer : Depends: java-common (>= 0.24) but it is not going to be installed
Recommends: gsfonts-x11 but it is not going to be installed
Recommends: oracle-java11-set-default but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Thanks
sudo
. I'd suggest asudo apt -f install
, and providing information such as your release of Lubuntu can be useful. Your error messages show prior ignored errors (google-chrome-stable
) that should be fixed first (before you try and add new packages such as the jdk) – guiverc May 01 '19 at 23:08google-chrome-stable
required dep. is available for some releases (https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=libappindicator3) but as you didn't provide your release; you'll have to look yourself. – guiverc May 01 '19 at 23:09sudo apt -f install
and if you had errors, what were they? The aforementioned package is available for 18.10 (https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=libappindicator3-1) so if youapt-cache policy libappindicator3-1
what do you get? You've either corrupted your sources, or are using an out-of-date mirror (https://launchpad.net/ubuntu/+archivemirrors) but please run the command I suggested in first comment as that's the first thing to fix (plus did you correct the permissions issue I've already answered, ie. you forgotsudo
). – guiverc May 02 '19 at 07:38apt-cache policy
suggestion (you didn't provide the response, now i'd also likeapt-cache policy java-common
as 18.10 provides a valid package but your box isn't seeing it. These commands (my comment of 5 hours ago asked) show where your box looks for it, as something is wrong there I suspect (ie. corrupt source, or out-of-date mirror why I gave link before) – guiverc May 02 '19 at 13:17