6

I am trying to get the arduino utilite installed to my Pi Zero, so I did

sudo apt-get install arduino

And it chugs away for a moment, then barfs this:

pi@raspberrypi:~ $ sudo apt-get install arduino
Reading package lists... Done
Building dependency tree       
Reading state information... Done
arduino is already the newest version (2:1.0.5+dfsg2-4.1).
0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.
10 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
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
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.

dpkg: error processing package openjdk-8-jre-headless:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jdk-headless:armhf:
 openjdk-8-jdk-headless:armhf depends on openjdk-8-jre-headless (= 8u151-b12-1~deb9u1); however:
  Package openjdk-8-jre-headless:armhf is not configured yet.

dpkg: error processing package openjdk-8-jdk-headless:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jdk:armhf:
 openjdk-8-jdk:armhf depends on openjdk-8-jdk-headless (= 8u151-b12-1~deb9u1); however:
  Package openjdk-8-jdk-headless:armhf is not configured yet.

dpkg: error processing package openjdk-8-jdk:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jre:armhf:
 openjdk-8-jre:armhf depends on openjdk-8-jre-headless (= 8u151-b12-1~deb9u1); however:
  Package openjdk-8-jre-headless:armhf is not configured yet.

dpkg: error processing package openjdk-8-jre:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-jre-headless:
 default-jre-headless depends on openjdk-8-jre-headless; however:
  Package openjdk-8-jre-headless:armhf is not configured yet.

dpkg: error processing package default-jre-headless (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-netx:armhf:
 icedtea-netx:armhf depends on openjdk-8-jre; however:
  Package openjdk-8-jre:armhf is not configured yet.

dpkg: error processing package icedtea-netx:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-8-plugin:armhf:
 icedtea-8-plugin:armhf depends on openjdk-8-jre; however:
  Package openjdk-8-jre:armhf is not configured yet.
 icedtea-8-plugin:armhf depends on icedtea-netx (= 1.6.2-3.1); however:
  Package icedtea-netx:armhf is not configured yet.

dpkg: error processing package icedtea-8-plugin:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-jre:
 default-jre depends on default-jre-headless (= 2:1.8-58+b2); however:
  Package default-jre-headless is not configured yet.
 default-jre depends on openjdk-8-jre; however:
  Package openjdk-8-jre:armhf is not configured yet.

dpkg: error processing package default-jre (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-java-plugin:
 default-java-plugin depends on default-jre (= 2:1.8-58+b2); however:
  Package default-jre is not configured yet.
 default-java-plugin depends on icedtea-8-plugin; however:
  Package icedtea-8-plugin:armhf is not configured yet.

dpkg: error processing package default-java-plugin (--configure):
 dependency problems - leaving unconfigured
Processing triggers for ca-certificates (20161130+nmu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

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.
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
 ca-certificates-java
 openjdk-8-jre-headless:armhf
 openjdk-8-jdk-headless:armhf
 openjdk-8-jdk:armhf
 openjdk-8-jre:armhf
 default-jre-headless
 icedtea-netx:armhf
 icedtea-8-plugin:armhf
 default-jre
 default-java-plugin
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ 

Any ideas how I might be able to get past this error? I think it might have something to do with this bug but I'm not really sure and I'm not sure what to do with the patch file.

Assorted diagnostic info:

pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.1 (stretch)
Release:    9.1
Codename:   stretch
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ cat /etc/apt/sources.list /etc/apt/sources.list.d/*
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l GNU/Linux
2
  • The errors seem to relate to installing java (although I am not sure whether this should already be installed), but I do know the version in the repository is HOPELESSLY OUT OF DATE. You should install the version from the Arduino site. arduino.stackexchange.com/a/44813/3879
    – Milliways
    Nov 5, 2017 at 23:23
  • Nice. Yea, that worked. If you post this as an answer I'll mark it. Nov 6, 2017 at 20:03

5 Answers 5

1

The Arduino version in the repository is HOPELESSLY OUT OF DATE. Many recent sketches will not compile, due to changes in library handling, and newer models lack support.

You should install the version from the Arduino site.

Download the latest Arduino IDE

You can follow the instructions in Install the Arduino Software (IDE) on on Linux however this installs only for the current user.

I ran the following to Install Arduino IDE on my Raspberry Pi3, so it is accessible to all users.

The following are for version 1.8.4, you should change for the latest, currently 1.8.5, although there is no significant difference that affects the Pi.

# Installing Arduino IDE
cd /usr/share/
sudo tar xf /home/pi/arduino-1.8.4-linuxarm.tar.xz
sudo chown root:root -R /usr/share/arduino-1.8.4/

# Adding desktop shortcut, menu item and file associations for Arduino IDE
# Each user needs to repeate this
cd
/usr/share/arduino-1.8.4/install.sh

There is a similar instruction in MagPi61 except they suggest installation in /opt

11

I actually fixed this error going step by step, apt seems to have a bug in the way it handles ca-certificates-java and openjdk-8-jre-headless on raspbian.

So I did :

sudo apt-get remove openjdk-8-jre-headless openjdk-8-jre
sudo apt-get install ca-certificates-java
sudo apt-get install openjdk-8-jre-headless
sudo apt-get install openjdk-8-jre # Optional, enables Java GUI apps
1

I just "sudo apt-get remove ca-certificates-java". Then the world is peaceful now. I guess you don't need any java things on Pi Zero.

0

As a matter of fact, the Arduino package install pulls the standard 'default-jdk' package, so this error exists sovereign of the "hopelessly out of date" repos that the previous answer refers to. This error can manifest itself in several applications outside of Arduino with the standard Debian JDK package, as indicated by the bug reports on the official Debian site (as of 11-13-17, in spite of the fact that it has been marked as closed). One such application is an Hadoop cluster deployment on a system that's not even running an RPi/Arduino (although it very well may be, as a cluster of RPi's happens to be an inexpensive data solution for the hobbyist/professional). Even so, a simple fix is to install the JDK for Java8 from Oracle, as this package is supported my many mainstream Java implementations. simply execute this code:

sudo apt-get install oracle-java8-jdk

This package WILL NOT throw the above errors on a Pi3B (tested with Apache's Hadoop), and should be an even more stable workaround for future implementations as well.

However, as the above answer states, it's probably a good idea to go with the Java implementation provided by Arduino for work on their proprietary boards.

0

I found a Very simple solution that is working find to sort out this issue.

I did installed freeplane that was not working and I get the error message by the end of the installation : missing server JVM at /usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'

After installing freeplane, I proceed immediately the following :

  1. --> Go to the location (copy past in the finder the following location) : /usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm
  2. --> Click right on arm directory and select Open directory with the terminal
  3. --> In LXterminal: copy client directory to a new directory server, by the follow terminal command : cp -r client server
  4. --> Reboot your system : sudo reboot

It will now work !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.