Help Please --- Java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Openhabian 2.5.12, Pi4
Help please!
Just did an update via openhabian-config and the system reports an error.
After that I stopped openhab, cleaned cache and restarted openhab, doesn´t help.
Openhab isn´t running. Restart and re-update doesn´t help either.

What can I do?

openhabian@openhab:~ $ sudo systemctl stop openhab2
openhabian@openhab:~ $ sudo openhab-cli clean-cache

This command will delete the temporary files within openHAB.
May resolve issues with addon installation and configuration.
The next start of openHAB will take a bit longer.

Okay to Continue? [y/N]: y
openhabian@openhab:~ $ sudo systemctl start openhab2
Job for openhab2.service failed because the control process exited with error code.
See "systemctl status openhab2.service" and "journalctl -xe" for details.
openhabian@openhab:~ $ systemctl status openhab2.service
● openhab2.service - openHAB2 instance, reachable at http://openhab:8080
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/openhab2.service.d
           └─override.conf
   Active: activating (start-post) (Result: exit-code) since Wed 2022-02-09 15:12:01 CET; 22s ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
  Process: 5511 ExecStartPre=/bin/bash -c /usr/bin/find ${OPENHAB_CONF} -name "*.rules" -exec /usr/bin/rename.ul .rules .x {} \; (code=exited, status=0/SUCCESS)
  Process: 5529 ExecStart=/usr/share/openhab2/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=127)
 Main PID: 5529 (code=exited, status=127); Control PID: 5530 (sleep)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/openhab2.service
           └─5530 /bin/sleep 120

Feb 09 15:12:01 openhab systemd[1]: Starting openHAB2 instance, reachable at http://openhab:8080...
Feb 09 15:12:01 openhab karaf[5529]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Feb 09 15:12:01 openhab karaf[5529]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Feb 09 15:12:01 openhab karaf[5529]: /usr/share/openhab2/runtime/bin/karaf: 95: [: Illegal number:
Feb 09 15:12:01 openhab karaf[5529]: /usr/share/openhab2/runtime/bin/karaf: 296: [: Illegal number:
Feb 09 15:12:01 openhab karaf[5529]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
Feb 09 15:12:01 openhab systemd[1]: openhab2.service: Main process exited, code=exited, status=127/n/a

You know the remote repositary changed nearly a year ago?
What update did you start this with?

I do update Openhabian (currently 2.5.12) from time to time.
Just used the standard Openhabian-config update functionality.
There was a message at the end of the update process about Java/Zulu version and I selected “Continue”. After that I got this stupid message,
OH isn´t running and I am not expert enough to see what is wrong now

Might be of interest

Note that openhabian and openHAB are two different things, each with their own version and update process.

Sure, I am on OpenHabian, and I tried this restart and re-update already - doesn´t help.
I am surprised why I am the only one having this trouble cause I am on the stable version and using
the standard update functionality …

Well, as you can see others had similar troubles some time ago. Many others have since moved to OH3.

Again, openhabian and openHAB are two different things.
Openhabian is a management tool that lets you install, update and configure openHAB and other software packages as well. Openhabian has it’s own versions and update process, nothing to do with OH 2.5.12 etc.

So what is your openhabian version?

Have you gone down the update to OH3 route a bit, installed Java11 ?
That won’t work with OH2, you need Java8

Because you are on the “stable” openHABian branch. Which, as the name indicates, does not change.
The Java fix/change only went into the main and openHAB3 branches and there are no plans to backport it. Those are the current, actively maintained ones, but they only work with OH3.

Not sure if I understand correctly, does that mean I cannot use any longer the default update functionality in openhabian-config for the 2.5.12 version? But this is still the Java version 8.something what is used by 2.5.12.

How can I fix that issue now?

It means that upgrading Java this way does not work any longer.

Restore from backup.

Upgrading that way? Please how should I upgrade when not using the standard functionality, sorry but I cannot see a fault on what I did, rather the upgrade functionality what was causing that trouble!

This time no backup performed, I thought no risk when using standard functionality.

Can I fix this on another way?
What is with that file the system is looking for?

So I found a backup from December, already 2.5.12 and i tried to restore.
Now guess what - I am getting an error for the restore

There was an error or interruption during the execution of: “50 | Backup/Restore”
Please try again

I don´t know what I should say now …

This is the restore log

##########################################
       openHAB 2.x.x restore script       
##########################################
                                          
Using '/etc/openhab2' as conf folder...
Using '/var/lib/openhab2' as userdata folder...
Making Temporary Directory
Extracting zip file to temporary folder.

 Backup Information:
 -------------------
 Backup Version         | 2.5.12 (You are on 2.5.12)
 Backup Timestamp       | 21_12_20-18_30_05
 Config belongs to user | openhab
             from group | openhab

Your current configuration will become owned by openhab:openhab.

Any existing files with the same name will be replaced.
Any file without a replacement will be deleted.

Okay to Continue? [y/N]: Moving system files in userdata to temporary folder
Deleting old userdata folder...
Restoring system files in userdata...
Deleting old conf folder...
Restoring openHAB with backup configuration...
Deleting temporary files...
Backup successfully restored!


$ systemctl restart openhab2.service 
Warning: The unit file, source configuration file or drop-ins of openhab2.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for openhab2.service failed because the control process exited with error code.
See "systemctl status openhab2.service" and "journalctl -xe" for details.
FAILED (restart openHAB)
2022-02-09_18:23:37_CET [openHABian] Checking for default openHABian username:password combination... OK
2022-02-09_18:23:37_CET [openHABian] We hope you got what you came for! See you again soon ;)
openhabian@openhab:~ $ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: ,,, (openhabian)
Password: 
==== AUTHENTICATION COMPLETE ===
openhabian@openhab:~ $ sudo shutdown -r 0

and after restart still no access to Openhab - Please help

mstormi is referring to a full backup of your system not a backup of the configuration only.

Looks like the installed java version is for a different platform.