在我们的其中一台服务器上,apt update
出现了奇怪的错误:
me@mimer:/etc/apt$ sudo apt update
Ign:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Err:4 http://archive.ubuntu.com/ubuntu xenial Release
503 Cache storage error - No such file or directory
Err:5 http://archive.ubuntu.com/ubuntu xenial-updates Release
503 Cache storage error - No such file or directory
Ign:6 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Err:7 http://security.ubuntu.com/ubuntu xenial-security Release
503 Cache storage error - No such file or directory
Ign:8 http://ppa.launchpad.net/costamagnagianfranco/borgbackup/ubuntu xenial InRelease
Err:9 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial Release
503 Cache storage error - No such file or directory
Err:10 http://ppa.launchpad.net/costamagnagianfranco/borgbackup/ubuntu xenial Release
503 Cache storage error - No such file or directory
Reading package lists... Done
E: The repository 'http://archive.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/costamagnagianfranco/borgbackup/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
与下面的机器的一个区别是,由于某种原因,mimer
它也在寻找 Release,但我不明白为什么或在哪里配置它。
me@mimer:/etc/apt$ grep -R Release .
me@mimer:/etc/apt$
没有什么?
与此同时,在另一台机器上它运行正常:
me@freja:/etc/apt$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://ppa.launchpad.net/ansible/ansible/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease
Ign:7 http://pkg.jenkins.io/debian-stable binary/ InRelease
Hit:8 http://pkg.jenkins.io/debian-stable binary/ Release
Hit:9 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:10 https://deb.nodesource.com/node_8.x xenial InRelease
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1120 kB]
Fetched 1338 kB in 1s (789 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
我尝试过的一些随机的greps
东西:
mimer
有网络并且文件似乎在那里吗?
me@mimer:/etc/apt$ curl -s http://archive.ubuntu.com/ubuntu/dists/xenial/Release | head
Origin: Ubuntu
Label: Ubuntu
Suite: xenial
Version: 16.04
Codename: xenial
Date: Thu, 21 Apr 2016 23:23:46 UTC
Architectures: amd64 arm64 armhf i386 powerpc ppc64el s390x
Components: main restricted universe multiverse
Description: Ubuntu Xenial 16.04
MD5Sum:
sources.list
从mimer
:
me@mimer:/etc/apt$ cat sources.list
#
# /etc/apt/sources.list
#
#
# trusty
#
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted universe
两台机器都运行 16.04。
me@mimer:/etc/apt$ lsb_release -id
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
现在有些奇怪的是,如果我将更改为sources.list
添加,[trusted=yes]
它似乎有效。是否有一些密钥或证书或某些东西会过期?
我已经尝试过apt clean
删除apt
锁文件等等。
请帮忙,我整天都在为此绞尽脑汁,非常乐意继续做我今天计划要做的事情...:)如果你想要任何输出,请告诉我。
答案1
所以结果是该服务器上配置了一个适当的代理(小公司,我身兼数职等...)并且显然该代理不再起作用了。
me@mimer:/etc/apt/apt.conf.d$ cat 00proxy
Acquire::http::Proxy "http://1.2.3.4:3142";
我将该文件移至另一个目录,然后apt update
现在又可以正常工作了。哇!