Build an open future with us.

Invest in Mycroft and become a community partner.

Picroft installation woes - no java server found


#1

I am trying to install mycroft on raspberry pi using picroft installation instructions. When I run the script to install it, I get the following error:

    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 (= 8u181-b13-2~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 (= 8u181-b13-2~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 (= 8u181-b13-2~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-jdk:
     default-jdk depends on openjdk-8-jdk; however:
      Package openjdk-8-jdk:armhf is not configured yet.

    dpkg: error processing package default-jdk (--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 default-jdk-headless:
     default-jdk-headless depends on default-jre-headless (= 2:1.8-58+b2); however:
      Package default-jre-headless is not configured yet.
     default-jdk-headless depends on openjdk-8-jdk-headless; however:
      Package openjdk-8-jdk-headless:armhf is not configured yet.

    dpkg: error processing package default-jdk-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+deb9u1) ...
    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-jdk
     default-jre-headless
     default-jdk-headless
     icedtea-netx:armhf
     icedtea-8-plugin:armhf
     default-jre
     default-java-plugin
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Build complete.  Press any key to review the output before it is deleted.

I looks like it was running into certificate errors when installing the java dependencies from dpkg. So I purged the java installation and installed the java certificates using the following commands:

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

Now I am getting the following errors when run the install script:

pi@picroft:~ $ bash ./update.sh 
Would you like to install Picroft on this machine?
Choice [Y/N]: mkdir: cannot create directory ‘/etc/mycroft/’: File exists
mkdir: cannot create directory ‘/home/pi/bin’: File exists

--2018-10-31 10:57:28--  https://raw.githubusercontent.com/MycroftAI/enclosure-picroft/stretch/etc/mycroft/mycroft.conf
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.116.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.116.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 285 [text/plain]
Saving to: ‘mycroft.conf’

mycroft.conf        100%[===================>]     285  --.-KB/s    in 0s      

Last-modified header missing -- time-stamps turned off.
2018-10-31 10:57:28 (3.00 MB/s) - ‘mycroft.conf’ saved [285/285]

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux
tmpfs /ramdisk tmpfs rw,nodev,nosuid,size=20M 0 0
Installing 'git'...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.11.0-3+deb9u4).
The following packages were automatically installed and are no longer required:
  erlang-base erlang-crypto erlang-syntax-tools fonts-lato icedtea-netx-common
  libatk-wrapper-java libatk-wrapper-java-jni libboost-thread1.62.0
  libqt5opengl5 libqt5scintilla2-12v5 libqt5scintilla2-l10n libqt5x11extras5
  libqwt-qt5-6 libruby2.3 libscsynth1 libsctp1 libyaml-0-2 rake ruby
  ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert
  ruby-test-unit ruby2.3 rubygems-integration
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
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
Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
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
E: Sub-process /usr/bin/dpkg returned an error code (1)
Downloading 'mycroft-core'...
fatal: destination path 'mycroft-core' already exists and is not an empty directory.

Beginning building mycroft-core.  This'll take a bit,
take a break.  Results will be in the ~/build.log
Installing packages...
Reading package lists...
Building dependency tree...
Reading state information...
autoconf is already the newest version (2.69-10).
automake is already the newest version (1:1.15-6).
bison is already the newest version (2:3.0.4.dfsg-1).
build-essential is already the newest version (12.3).
curl is already the newest version (7.52.1-5+deb9u7).
flac is already the newest version (1.3.2-1).
git is already the newest version (1:2.11.0-3+deb9u4).
jq is already the newest version (1.5+dfsg-1.3).
libfann-dev is already the newest version (2.2.0+ds-3).
libffi-dev is already the newest version (3.2.1-6).
libglib2.0-dev is already the newest version (2.50.3-2).
libicu-dev is already the newest version (57.1-6+deb9u2).
libjpeg-dev is already the newest version (1:1.5.1-2).
libssl-dev is already the newest version (1.1.0f-3+deb9u2).
libtool is already the newest version (2.4.6-2).
mpg123 is already the newest version (1.23.8-1).
pkg-config is already the newest version (0.29-4).
portaudio19-dev is already the newest version (19.6.0-1).
python-gobject-2-dev is already the newest version (2.28.6-13).
python-setuptools is already the newest version (33.1.1-1).
python3 is already the newest version (3.5.3-1).
python3-dev is already the newest version (3.5.3-1).
screen is already the newest version (4.5.0-6).
swig is already the newest version (3.0.10-1.1).
The following packages were automatically installed and are no longer required:
  erlang-base erlang-crypto erlang-syntax-tools fonts-lato icedtea-netx-common
  libatk-wrapper-java libatk-wrapper-java-jni libboost-thread1.62.0
  libqt5opengl5 libqt5scintilla2-12v5 libqt5scintilla2-l10n libqt5x11extras5
  libqwt-qt5-6 libruby2.3 libscsynth1 libsctp1 libyaml-0-2 rake ruby
  ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert
  ruby-test-unit ruby2.3 rubygems-integration
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                                                              2 not fully installed or removed.
               After this operation, 0 B of additional disk space will be used.
                                                                               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
Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
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
E: Sub-process /usr/bin/dpkg returned an error code (1)
Build complete.  Press any key to review the output before it is deleted.

Am I just having badluck here? Any ideas?


#2

OK, I think there might be more than one issue going on here.

First, lets fix openjdk - can you please do:

sudo apt-get purge openjdk-8-jre-headless
sudo apt-get install openjdk-8-jre-headless
sudo apt-get install openjdk-8-jre

and let me know how you go?