If software cannot be installed under Debian, Ubuntu and their derivatives via the official package sources, developers often ask Personal Package Archives (PPA) available. In order to use these, a key must be added to the system so that it trusts the PPAs. So far it has worked apt key add – but this is deprecated in current systems, i.e. outdated and no longer available.
gpg instead of apt-key
Let's take a concrete example: the software audio bookshelf provides a traditional installation guide:
PPA hinzufügen: sudo apt install gnupg curl curl -s https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg | sudo apt-key add - sudo curl -s -o /etc/apt/sources.list.d/audiobookshelf.list https://advplyr.github.io/audiobookshelf-ppa/audiobookshelf.list Audiobookshelf installieren: sudo apt update sudo apt install audiobookshelf
However, the following line no longer works and only returns the deprecated message:
curl -s https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg |\ sudo apt-key add -
The entire error message then reads:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
By the way: apt key(8) means:
man apt-key 8
Section 8 does not mean time bulls here, but the part with administrative commands in the handbook/manual.
The new way, described in Debian Wiki:
curl -s https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg |\ sudo gpg -o /usr/share/keyrings/foobar-archive-keyring.gpg --dearmor
So instead of apt-key doing the job now gpg. About -o is output to the specified file (output file) and dearmor removes the encoding feature ASCII armor. But you don't have to worry about that.
While the installation instructions may vary slightly, the bottom line is that your
apt-key add by
gpg --dearmor -o replaced.