Problems installing Open JDK 17

Hello,

I’m having trouble installing the “openjdk-17-jdk-headless” package via apt on the current DietPi. What would be the easiest way to install Java 17? I would like to install and test the “Thingsboard” software, but it requires Java 17. I tried openjdk-21 and it does not work.

I get the message:
Error: Package openjdk-17-jdk-headless cannot be found.

Do I need to add another repo or adjust a configuration somewhere so I can access a different Debian repo?

Thank you in advance.

You could have started to fill the troubleshooting template

You are right, sorry, this was my mistake. I thought everything important was in my text, I spent several hours today searching for solutions on google, but unfortunately I couldn’t find any so far

I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=17
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
  • Distro version | trixie
  • Kernel version | Linux 6.12.48+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.48-1 (2025-09-20) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | - VM
  • Power supply used | - VM
  • SD card used | - VM

Additional Information (if applicable)

  • Software title | ThingsBoard
  • i tried to install Thingsboard which needs Java 17 as a dependency
  • Can this issue be replicated on a fresh installation of DietPi? → yes

Steps to reproduce

<!-- Explain how to reproduce the issue -->
  1. apt install openjdk-17-jdk-headless
    

Expected behaviour

<!-- What SHOULD be happening? -->
  • openjdk 17 gets installed…

Actual behaviour

<!-- What IS happening? -->
  • Error Message: Fehler: Paket openjdk-17-jdk-headless kann nicht gefunden werden.
<!-- Please post any extra details that might help solve the issue -->

The package you are trying to install is not available anymore in debian trixie https://packages.debian.org/search?suite=trixie&arch=any&searchon=names&keywords=openjdk

You would need to install version 21 or 25 or if you explicitly need version 17, build it by yourself.
But I guess it should be compatible with version 21 too.

dietpi-software install 8

not necessarily, the alternative would be adoptium JFrog

Similar we do as well

1 Like

Thank you very much!

this guide helped me:

at the end i was able to install with:

“apt install temurin-17-jdk”

and now i can install and configure ThingsBoard (and start it / open the WebUI)

1 Like