having trouble installing Java

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

having trouble installing Java

Post by ginahoy »

I'm trying to install Java (so I can access Google maps) and as a new Linux user, I've encountered several problems I don't understand. First, the Java download page (https://java.com/en/download/linux_manual.jsp), gives me a choice of .gz or .rpm. I checked the installation instructions and there's no guidance on which version to use so I arbitrarily started with rpm.

Second, the download link doesn't work. I get the "open or save" dialogue box, but when I click "OK", nothing happens. I thought there was a problem with the java website but I had no problem downloading the file on my old XP machine. So I grabbed it and copied it over.

Next, according to the java installation instructions, I need to 'become root', "by running su". I recall from a previous thread I need to type "sudo su" from the terminal and enter my p/w to become root. Done.

Following the example in the installation instructions, I created the directory /usr/java and attempted to copy the installation file to that directory. The "paste" option on the File Manager was grayed out when I navigated to the new directory. I figured out I needed to use the "Open as root" option in File Manager. With that, I was able to paste the installation file into the new /usr/java directory.

But when I attempted to install (rpm -ivh jre-8u144-linux-x64.rpm), I was prompted to install rpm by typing "apt install rpm". Once I installed rpm, I ran the rpm command again. I get the following error. Now I'm stuck. Since I clearly don't know what I'm doing, and I have no idea what Alien is or how to use it, I thought I'd better stop by here for help.

Code: Select all

rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: Failed dependencies:
	/bin/basename is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/cat is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/cp is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/gawk is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/grep is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/ln is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/ls is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/mkdir is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/mv is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/pwd is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/rm is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/sed is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/sort is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/touch is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/cut is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/dirname is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/expr is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/find is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/tail is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/tr is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/usr/bin/wc is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
	/bin/sh is needed by jre1.8.0_144-1.8.0_144-fcs.x86_64
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
Pjotr
Level 24
Level 24
Posts: 20135
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: having trouble installing Java

Post by Pjotr »

Try this:
https://sites.google.com/site/easylinuxtipsproject/java

But before you install: you don't need Java for using Google Maps. Javascript: probably yes, but you already have that enabled by default in your web browsers. But not Java.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: having trouble installing Java

Post by ginahoy »

Ok. I see now that the message I was getting when I navigated to google maps refers to javascript, not java. Turns out it was a errant setting in my scriptblocker add-on. Thanks.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: having trouble installing Java

Post by karlchen »

Hi, ginahoy.

One piece of advice for the future:
+ Software packages in .rpm format are not meant for Linux Mint.
+ Software packages in .deb format are meant for Linux Mint, LMDE 2, Ubuntu, Debian.

To cut it short:
You might like to read xenopeek's article on "How to install software on Linux Mint" carefully.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: having trouble installing Java

Post by ginahoy »

Thanks for that link, Karl. Very helpful.

Since RPM is not intended for LM, I should remove it, no? How do I do that? According to the article you linked, using 'apt install program' adds that program to the Update Manager. Will removing the program also remove it from Update Manager?
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: having trouble installing Java

Post by karlchen »

Hello, ginahoy.

The error messages which you posted in your initial message suggest to me that the package rpm has not been installed. In order to examine what the installation status of "rpm" is, you may e.g. use the terminal command

Code: Select all

dpkg --list rpm
Post the screen output, in case you need help in interpreting what dpkg tells.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: having trouble installing Java

Post by ginahoy »

Code: Select all

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  rpm            4.12.0.1+dfs amd64        package manager for RPM
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: having trouble installing Java

Post by karlchen »

Hello, ginahoy.

dpkg tells that rpm has been installed on your system. This in itself should do no harm.
In case you wish to uninstall it, you might
  • either use Synaptic package manager in the Mint Menu, locate the package named rpm in Synaptic, right click it, select mark for removal and apply.
  • or you might use the terminal command

    Code: Select all

    sudo apt-get remove rpm
    and confirm that you really want to remove rpm.
--
P.S.:
I had misinterpreted the error messages in your first post. They had been the result of the commandline rpm -ivh jre-8u144-linux-x64.rpm So rpm itself had to be present your system. Only rpm had failed to install the software package jre-8u144-linux-x64.rpm.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: having trouble installing Java

Post by ginahoy »

Thanks for all!
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
Locked

Return to “Beginner Questions”