[Solved] Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

 If you run apt update, you probably will see the following message:

[Solved] Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

To solve it, you need to export the GPG key from the deprecated keyring and store it in /usr/share/keyrings.

To do it, just get the last 4 bytes from the fingerprint and export the key to /usr/share/keyrings folder:

sudo apt-key list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2018-08-14 [SC]
      E869 7E2E EF76 C02D 3A63  3277 8881 B2A8 2109 76F2
uid           [ unknown] Package Manager (Package Signing Key) <packages@pgadmin.org>
sub   rsa4096 2018-08-14 [E]

 sudo apt-key export 210976F2 | sudo gpg --dearmour -o /usr/share/keyrings/pgadmin4.gpg
 

Now, you need to update the apt source file and add a signed-by tag between deb and the url:

sudo vim /etc/apt/sources.list.d/pgadmin4.list

deb [signed-by=/usr/share/keyrings/pgadmin4.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/impish pgadmin4 main
 

Finally, you can remove the original signature:

sudo apt-key del 210976F2

Enjoy it!

 



Comments

Popular posts from this blog

How to fix Android when developer options are not available for this user

Exception: Could not find a default OpenFlow controller in Mininet

v4l2: open /dev/video0: Permission denied