I require to install openjdk (7 / 8 or above) on to my pi.
I have (currently) installed noobs/raspbian/oracle jdk (from https://www.raspberrypi.org/...) on to the SD card.
Please can you advise (pref with steps) how I do this? Is openjdk already on the sd card? I don't think so
since dpkg.. showed it is not installed.
which implementation of openjdk is usually used with the pi?
where do I download it from?
how upload to sd card / install?
thank you.
Re: how install openjdk?
Code: Select all
sudo apt-get update
sudo apt-get install -y galternatives openjdk-8-jdk
ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Re: how install openjdk?
openjdk-9-jdk is also available in the repository.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: how install openjdk?
thank you for reply.
However when I type: sudo apt-get update,
error messages are shown and the install fails also (see below)
I am not connected to the internet - do I need to be?
Do I need to modify config file?
I do not currently have access to the ethernet/internet - can/how do
I install using SD card?
Err http://mirrordiringector.raspbian.org jessie Release...
Temporary failure resolving 'mirror.director.raspbian.org'
...
Failed to fetch http://mirrordirector.../raspbian/dists ... /InRelease
Failed to fetch http://archive.raspberrypi.org/debian/d ... elease.gpg
...
Some index files failed to download
thank you
However when I type: sudo apt-get update,
error messages are shown and the install fails also (see below)
I am not connected to the internet - do I need to be?
Do I need to modify config file?
I do not currently have access to the ethernet/internet - can/how do
I install using SD card?
Err http://mirrordiringector.raspbian.org jessie Release...
Temporary failure resolving 'mirror.director.raspbian.org'
...
Failed to fetch http://mirrordirector.../raspbian/dists ... /InRelease
Failed to fetch http://archive.raspberrypi.org/debian/d ... elease.gpg
...
Some index files failed to download
thank you
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: how install openjdk?
steve103 wrote: ↑Thu Dec 14, 2017 8:47 amthank you for reply.
However when I type: sudo apt-get update,
error messages are shown and the install fails also (see below)
I am not connected to the internet - do I need to be?
Do I need to modify config file?
I do not currently have access to the ethernet/internet - can/how do
I install using SD card?
Err http://mirrordiringector.raspbian.org jessie Release...
Temporary failure resolving 'mirror.director.raspbian.org'
...
Failed to fetch http://mirrordirector.../raspbian/dists ... /InRelease
Failed to fetch http://archive.raspberrypi.org/debian/d ... elease.gpg
...
Some index files failed to download
thank you
Yes internet is a requirement of apt-get update....................
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: how install openjdk?
When I issue the apt-get install command I get a slew of errors, starting with:
Setting up ca-certificates-java (20170531+nmu1) ...
Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
dpkg: error processing package ca-certificates-java (--configure):
subprocess installed post-installation script returned error exit status 4
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for sgml-base (1.29) ...
Setting up python-gobject-2 (2.28.6-13) ...
Setting up libglade2-0:armhf (1:2.6.4-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up python-cairo (1.8.8-2.2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
dpkg: dependency problems prevent configuration of openjdk-8-jre-headless:armhf:
openjdk-8-jre-headless:armhf depends on ca-certificates-java; however:
Package ca-certificates-java is not configured yet.
Does anyone know how to fix these errors?
Setting up ca-certificates-java (20170531+nmu1) ...
Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
dpkg: error processing package ca-certificates-java (--configure):
subprocess installed post-installation script returned error exit status 4
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for sgml-base (1.29) ...
Setting up python-gobject-2 (2.28.6-13) ...
Setting up libglade2-0:armhf (1:2.6.4-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up python-cairo (1.8.8-2.2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
dpkg: dependency problems prevent configuration of openjdk-8-jre-headless:armhf:
openjdk-8-jre-headless:armhf depends on ca-certificates-java; however:
Package ca-certificates-java is not configured yet.
Does anyone know how to fix these errors?
Re: how install openjdk?
Maybe you are using an old version of noobs (raspbian jessie) so best bet is to start with a fresh install of raspbian (stretch) from the current Noobs download or current Rasbian Stretch with Desktop.
Re: how install openjdk?
No, it's stretch, and I just re-installed it. It seems to be a certificates problem, as I also get similar errors when Maven tries to download anything.
I'm reading up on ca-certificates now. I should probably start a new thread if I have questions about that, huh?
I'm reading up on ca-certificates now. I should probably start a new thread if I have questions about that, huh?
Re: how install openjdk?
I got around that by uninstalling the installed Java first. Then install openjdk. I'm not sure but I think it is a problem with the installer looking in the wrong place for certificates (but I could definitely be wrong).