nvidia-container-toolkit.list
以下是原文GitHub
:
https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list
deb https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
#deb https://nvidia.github.io/libnvidia-container/experimental/deb/$(ARCH) /
这是 Nvidia 的文档:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
我尝试signed-by
手动添加“ ”,然后将“ $(ARCH)
”替换为“ amd64
”或“ amd64
”:
deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/amd64 /
or
deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ amd64 /
但“ apt-get update
”失败并出现以下错误:
E: Malformed line 1 in source list /etc/apt/sources.list.d/nvidia-container-toolkit.list (type)
E: The list of sources could not be read.
这是echo $(ARCH)
Ubuntu 中的:
# echo $(ARCH)
ARCH: command not found
“”的正确形式是什么nvidia-container-toolkit.list
?
更新:
如果我不替换$(ARCH)
,错误仍然是相同的。我认为原来的nvidia文档是错误的。
更新2:
问题可能与“$(ARCH)”有关,nvidia中的$(ARCH)是什么?
他们的剧本坏了。我运行了上面的curl 脚本,它确实创建了一个损坏的sources.list 文件。所以我纠正了它,
apt update
现在可以工作了: