Upgrading to java17 openhab4

The problem is related to libc6 not being updated to a version beyond 2.34 which is required for Java 17.
Try searching for this if there is a way to update that package first.

EDIT:
without any warranty and at risk of potentially breaking your system.
Try

sudo apt install gcc-10-base