The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release' is not signed

Hi @tj_tsai
The apt-key command is deprecated and will be removed in Debian 12 and Ubuntu 22.10, see: DebianRepository/UseThirdParty - Debian Wiki

The cuda-keyring package contains 3 files:

  1. /usr/share/keyrings/cuda-archive-keyring.gpg
  2. /etc/apt/sources.list.d/cuda-$distro-$arch.list
  3. /etc/apt/preferences.d/cuda-repository-pin-600

This (1) installs the GPG key, (2) enables the repo, and (3) prioritizes the repository higher.

The “conflicting values set” indicates there are duplicate .list entries, either another cuda*.list file in /etc/apt/sources.list.d/ or appended to /etc/apt/sources.list.

If the latter, you can remove the duplicate entry with

sudo sed -i '/developer\.download\.nvidia\.com\/compute\/cuda\/repos/d' /etc/apt/sources.list