在我们的服务器上,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也在寻找发行版,但我不知道为什么或者在哪里配置它。
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锁文件等。
请帮帮忙,我一整天都在为这件事大发雷霆,很乐意继续我今天的计划……如果你想从任何东西中得到产出,请告诉我。
发布于 2020-03-27 14:38:05
原来在服务器上配置了一个apt代理(小公司,我有很多,很多帽子……)很明显那个代理已经失效了。
me@mimer:/etc/apt/apt.conf.d$ cat 00proxy
Acquire::http::Proxy "http://1.2.3.4:3142";我将该文件移到另一个目录,然后apt update再次工作。哇!
https://askubuntu.com/questions/1220709
复制相似问题