Problem with Package Repository Installation

  • Issue of the topic:
    Installation of OpenHab like described here

I tried to install OpenHab on a new SD Card on my Pi 4 (8GB)
I used the Debian Bullseye image without Desktop and installed Java V11.0.17

Then I tried the installation of OpenHab like described and the first command ends in an error.

curl -fsSL “” | gpg --dearmor > openhab.gpg

I get the following message:

-bash: openhab.gpg: Permission denied
(23) Failed writing body

Do iI have to install something else before?

Old Version with

wget -qO - ‘’ | sudo apt-key add -

works but I got the standard warning

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

That was the reason I wanted to start with gpg instead of apt-key.

Thanks in advance.

  • Platform information:
    • Hardware: Pi 4 8GB
    • OS: Raspian Debian Bullseye 64bit without Desktop
    • Java Runtime Environment: openjdk 11.0.17 2022-10-18 LTS
    • openHAB version:

That just means you do not have write permissions on the current directory so the redirection > openhab.gpg cannot write that file. Perhaps type cd to go to your home dir first?

I´m on at /home

pi@raspberrypi:/home $ sudo curl -fsSL “” | gpg --dearmor > openhab.gpg
-bash: openhab.gpg: Permission denied
(23) Failed writing body

Are you in /home? That’s not your home directory.

Have you typed cd ? Or cd ~ ? (should do the same thing).

What does pwd tell you?

Sorry was away and wanted to try it again.
Now I got no fault message.

Possible that the fault was caused because the page maybe could not be reached?

That should have created a different message then.

just pressed arrow up so it was the same line but this time without a fault message.