我们有一台 Ubuntu 18.04 服务器,有人报告从 git 克隆时出现问题(我检查过,无法克隆我自己的存储库),我想运行 apt 更新,但在那里遇到了大量问题:
sudo apt-get update
Get:1 file:/var/cuda-repo-ubuntu1804-11-0-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu1804-11-0-local InRelease
Get:2 file:/var/cuda-repo-ubuntu1804-11-0-local Release [564 B]
Get:2 file:/var/cuda-repo-ubuntu1804-11-0-local Release [564 B]
Err:4 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
403 Forbidden [IP: 185.199.108.153 443]
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease
Err:7 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic InRelease
403 Forbidden [IP: 104.18.20.224 443]
Hit:8 http://de.archive.ubuntu.com/ubuntu bionic InRelease
Err:9 http://dell.archive.canonical.com/updates bionic-dell-beaver-pearl InRelease
403 Forbidden [IP: 185.125.189.10 80]
Hit:10 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
Hit:11 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:12 http://oem.archive.canonical.com/updates bionic-oem InRelease
403 Forbidden [IP: 185.125.189.10 80]
Hit:13 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:14 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:15 http://dell.archive.canonical.com/updates bionic-dell-service InRelease
403 Forbidden [IP: 185.125.189.10 80]
Hit:16 https://repo.anaconda.com/pkgs/misc/debrepo/conda stable InRelease
Hit:17 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:3 https://repo.saltproject.io/py3/ubuntu/18.04/amd64/latest bionic InRelease
Err:18 http://archive.canonical.com/ubuntu bionic InRelease
403 Forbidden [IP: 91.189.91.15 80]
Err:19 http://dell.archive.canonical.com/updates bionic-dell InRelease
403 Forbidden [IP: 185.125.189.10 80]
Err:20 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
403 Forbidden [IP: 142.250.185.78 443]
Ign:22 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease
Hit:23 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease
Hit:24 http://repo.zabbix.com/zabbix/5.2/ubuntu bionic InRelease
Reading package lists... Done
对于每一个 Err:,我都有类似的内容
E: The repository 'https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic InRelease' is not signed.
E: Failed to fetch https://packages.gitlab.com/runner/gitlab-runner/ubuntu/dists/bionic/InRelease 403 Forbidden [IP: 104.18.20.224 443]
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
我甚至不知道从哪里开始调试。我已经更新了 CA 证书,并重新启动了系统,但这并没有改变行为。当打开链接时(例如https://packages.gitlab.com/runner/gitlab-runner/ubuntu/dists/bionic/InRelease),看上去运行正常?
我可以采取什么步骤来解决这个问题?
答案1
这可能是因为存储库已关闭或不可用,或者他们更改了其 URL,或者仅仅是网络问题。
您可以尝试以下方法:
- 使用网络浏览器查看 repo 是否已关闭或不可用(您似乎已经尝试过)
- 查看 url 或 auth 方法是否已更改,你可以在其文档中查看,如果有,请相应地更新你的 apt
- 检查你的网络是否配置正确
- 最后,如果没有效果,你可以尝试在这里使用不同的存储库https://help.ubuntu.com/community/Repositories/Ubuntu