JAVA Error: libjli.so - Cannot open shared object file

I had this happen yesterday and after flailing for quite a while, I ran:

sudo apt-get reinstall zulu*

I realize it was a large hammer solution, but it fixed both my openhab machines.

Ira

Hi, followed these same steps … and it solved my problem. Dashboard started and I could reach the start page. Hopefully it will continue working because I still saw the same error(s):

[17:15:46] openhabian@openhab:~$ May 11 17:12:12 openhab karaf[13981]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory.

Thanks to all for the info

I ran into this today after a fresh install. Solved by changing the ownership of the zulu installation folder.

sudo chown -R root:root /opt/zulu11.<version>
sudo systemctl restart openhab.service
1 Like

After a fresh install of what - openHABian ? From image ? HW ?

  • Raspberry Pi 4B 2GB
  • Raspbian 10 (buster)
  • OpenHAB 3.0.1

Then followed the manual installation instructions

OpenHab did initially run without any changes, perhaps after a restart it runs as a different user.

So another example why better to use openHABian rather than to try to make all the bits and pieces fit together on your own.

Running openHABian at the latest version - and today’s update left me here:

Jan 24 21:47:54 openhabianpi systemd[1]: openhab.service: Service RestartSec=5s expired, scheduling restart.
Jan 24 21:47:54 openhabianpi systemd[1]: openhab.service: Scheduled restart job, restart counter is at 4.
Jan 24 21:47:54 openhabianpi systemd[1]: Stopped openHAB instance, reachable at http://openhabianpi:8080.
Jan 24 21:47:54 openhabianpi systemd[1]: Started openHAB instance, reachable at http://openhabianpi:8080.
Jan 24 21:47:54 openhabianpi karaf[2114]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 24 21:47:54 openhabianpi karaf[2114]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 24 21:47:54 openhabianpi karaf[2114]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:
Jan 24 21:47:54 openhabianpi karaf[2114]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:
Jan 24 21:47:54 openhabianpi karaf[2114]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
Jan 24 21:47:54 openhabianpi systemd[1]: openhab.service: Main process exited, code=exited, status=127/n/a
Jan 24 21:47:54 openhabianpi systemd[1]: openhab.service: Failed with result 'exit-code'.

Seems my java installation is broken since the last update…

I just issued a temporary patch and it should fix the issue for the moment try updating running sudo openhabian-config update when prompted then run menu option 2 and see if that resolves the issue. Azul has broken their API again, complain to them.

1 Like

Fix is actually working now for anyone with the issue.

1 Like