terminal failed to install Java

Asked by Igor Evgen

HI,
From the official site I tried to install Java on my Ubuntu 18.04.2 LTS via the Terminal.
That was going fine until a sort of Agreement I had to accept.
It had <OK> not clickable. Full stop.
I had to close the Terminal for it hung up.
After that, I tried again and again but received only this:

sudo apt install default-jdk
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

So, what to do? Any help is appreciated.
Thanks for your time. Igor

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

Screens like the one asking to accept the license do not react on mouse clicks, but require navigation with the tab/backtab, up/down, left/right, space and enter keys.

By killing the terminal there now is a stalled installation process still running, and the package management system makes sure that only one process changing installed packages is running at the same time.

You have to kill all remaining package management processes.
This can be done either by rebooting, or with the commands
sudo fuser -vvv /var/lib/dpkg/lock-frontend
sudo fuser -k /var/lib/dpkg/lock-frontend

Revision history for this message
Igor Evgen (evgenigor) said :
#2

Thank you, Manfred.
I'll keep your good information.
GOD bless you. Igor

Revision history for this message
boussad (picks) said :
#3

There are a few ways to install Java in Ubuntu:

Install OpenJDK (The open source equivalent to Sun's Java) directly from Ubuntu Software Center. All you need to do is search for Java. That tends to work as is for me.

If you need Sun's Java, say if you want to play Minecraft, you download the JRE as you described from Java.com, but make sure your .bin-file can be executed. You do that by opening a terminal and typing the following (I will assume you have it in your Downloads folder so change the cd line accordingly if that's not where it is):

cd /home/user/Downloads
sudo chmod +x jre-6u31-linux-i586.bin

Revision history for this message
Igor Evgen (evgenigor) said :
#4

 Thank you Boussad for your good help!The matter is solved.Igor

    On Wednesday, March 27, 2019, 9:13:17 PM GMT, boussad <email address hidden> wrote:

 Your question #679502 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/679502

boussad posted a new comment:

There are a few ways to install Java in Ubuntu:

Install OpenJDK (The open source equivalent to Sun's Java) directly from
Ubuntu Software Center. All you need to do is search for Java. That
tends to work as is for me.

If you need Sun's Java, say if you want to play Minecraft, you download
the JRE as you described from Java.com, but make sure your .bin-file can
be executed. You do that by opening a terminal and typing the following
(I will assume you have it in your Downloads folder so change the cd
line accordingly if that's not where it is):

cd /home/user/Downloads
sudo chmod +x jre-6u31-linux-i586.bin

--
You received this question notification because you asked the question.