hey anyone know how to fix this ? i got the error when i run package updates
Missing signed-by= in one or more APT sources list
Keys stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg) have been deprecated, see the DEPRECATION section in apt-key(8) for details.
The /etc/apt/trusted.gpg.d/debsuryorg-archive.gpg file will be removed in the next update of the package and you MUST update your APT sources to include
[signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] directive. See the Debian Wiki for more information: https://wiki.debian.org/DebianRepository/UseThirdParty#Sources.list_entry
hey thank you for the reply, is this the correct way to do it ?
Edit the php.list file sudo nano /etc/apt/sources.list.d/php.list
Change: deb https://packages.sury.org/php/ bookworm main to deb [arch=amd64 signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ bookworm main
The info came over apticron yesterday on this issue with Debian and php:
--- News for debsuryorg-archive-keyring ---
debsuryorg-archive-keyring (2025.03.11) unstable; urgency=medium
* The /etc/apt/trusted.gpg.d/debsuryorg-archive.gpg global APT key will
been removed in the next update of the package.
The script will try to autodetect whether any APT repository is not
configured with signed-by= directive and will print warning about the
installation of this package.
You need to manually add:
[signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg]
to your APT sources lists. See the Debian Wiki for more information:
https://wiki.debian.org/DebianRepository/UseThirdParty#Sources.list_entry
-- Ondřej Surý <[email protected]> Tue, 11 Mar 2025 14:08:14 +0100
I get errors when using the following
deb [arch=amd64 signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] bookworm main
[signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg]
You forgot to add the url to the repo in the first line and you should not add the second line. Also, double check that the gpg key /usr/share/keyrings/debsuryorg-archive-keyring.gpg exists.
I modified it because i got the warning, but i still get the warning. Can you clarify if i should revert back to my original which is deb [arch=amd64 signed-by=/usr/share/keyrings/sury-keyring.gpg] https://packages.sury.org/php/ bullseye main
Yes that was my original, after i saw the warning i unfortunately stopped the update and edited the php.list and then run apt again. Will there be any damage from this? I have now replaced the php.list with my original backup copy.
The main takeaway here is that you need the Sury apt key on your filesystem and you need to reference it in both your PHP and your Apache apt sources list files so that the repository signature can be validated by apt. Mine is currently located at /usr/share/keyrings/debsuryorg-archive-keyring.gpg and that is the file referenced in my apt sources list files.
The correct apt keyring file to download is the one the @T4B referenced: https://packages.sury.org/php/apt.gpg. The same file is also located at https://packages.sury.org/apache2/apt.gpg