はじめに
apt-keyコマンドは非推奨らしいので、gpgコマンドでdearmorする練習とメモ
Ubuntu 22.04 で apt update すると以下のように警告を受けるようになった
# apt update
Hit:1 https://download.newrelic.com/infrastructure_agent/linux/apt jammy InRelease
...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: https://download.newrelic.com/infrastructure_agent/linux/apt/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
#
対処方法
これで警告が消えました
# curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpg
# apt update
Hit:1 https://download.newrelic.com/infrastructure_agent/linux/apt jammy InRelease
...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
#