1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NVIDIA L4T Base コンテナの`apt-get update` 警告対応

Last updated at Posted at 2025-01-04

背景

電子証明OpenPGP公開鍵の管理にapt-keyコマンドを使用することが非推奨になった1ため、NVIDIAが提供するDockerイメージのl4t-baseコンテナ内で以下の警告がでるようになった

$ apt-get update
Hit:1 https://repo.download.nvidia.com/jetson/common r36.2 InRelease
Hit:2 http://packages.ros.org/ros2/ubuntu jammy InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
W: https://repo.download.nvidia.com/jetson/common/dists/r36.2/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

この警告を今後のために解決するための方法を記載する

動作環境

Hardware JetsonNano
OS Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Kernel R32 (release), REVISION: 7.6
BOARD: t210ref
EABI: aarch64
Docker Docker version 20.10.21, build 20.10.21-0ubuntu1~18.04.3

再現方法

# Dockerイメージをダウンロード
$ docker pull nvcr.io/nvidia/l4t-base:r36.2.0
# Dockerコンテナを起動する
$ docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:r36.2.0
# リポジトリアップデート
$ apt-get update
##
##
Hit:1 https://repo.download.nvidia.com/jetson/common r36.2 InRelease
Hit:2 http://packages.ros.org/ros2/ubuntu jammy InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
W: https://repo.download.nvidia.com/jetson/common/dists/r36.2/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

対策

  • GPGキーをダウンロードし直す

$ curl -s https://repo.download.nvidia.com/jetson/jetson-ota-public.asc | \
    gpg --no-default-keyring --keyring /tmp/nvidia.gpg --import
  • GPGキーを変換する

$ gpg --no-default-keyring --keyring /tmp/nvidia.gpg \
    --export --output /usr/share/keyrings/nvidia.gpg
  • source.listに鍵を紐づける

source.listファイルを開く

$ nano /etc/apt/source.list

jetsonのリポジトリパスに公開鍵を紐づける

deb https://repo.download.nvidia.com/jetson/common r36.2 main
 ↓
deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://repo.download.nvidia.com/jetson/common r36.2 main
  • インストール済みの鍵を削除する
$ 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 2019-05-09 [SC]
      3C6D 1FF3 100C 8C3A BB08  69C0 E654 3461 A999 6195
uid           [ unknown] NVIDIA Corporation <linux-tegra-bugs@nvidia.com>
sub   rsa4096 2019-05-09 [E]
sub   rsa4096 2019-05-09 [S]

/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
$ apt-key del A9996195
  1. Ubuntu: apt-key is deprecated

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?