我在本地网络中运行squid-deb-proxy
服务器。运行所有 APT 命令时,它适用于所有软件包下载。它针对所有可能的已知镜像 URL 进行了配置,包括旧版本.Ubuntu 19.10客户端已安装客户端-squid-deb-proxy-client
包。
$ dpkg -l squid-deb-proxy-client | tail -n1
ii squid-deb-proxy-client 0.8.14+nmu2 all automatic proxy discovery for APT based on Avahi
$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu eoan InRelease
Hit:2 http://archive.ubuntu.com/ubuntu eoan-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu eoan-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu eoan-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
但是当我尝试启动升级过程以获取 20.04 LTS 时 -sudo do-release-upgrade
在终端中使用我收到以下错误消息:
$ sudo do-release-upgrade
Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife
Get:1 Upgrade tool signature [1 554 B]
Get:2 Upgrade tool [1 342 kB]
Fetched 1 343 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
Authentication failed
Authenticating the upgrade failed. There may be a problem with the network or with the server.
我在服务器端的日志中没有看到任何特殊内容squid-deb-proxy
:
==> /var/log/squid-deb-proxy/access.log <==
1595069772.862 212 192.168.3.47 TCP_MISS/200 3349 CONNECT changelogs.ubuntu.com:443 - HIER_DIRECT/91.189.95.15 -
1595069774.726 2 192.168.3.47 TCP_MEM_HIT/200 1950 GET http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz.gpg - HIER_NONE/- application/x-gzip
1595069775.410 681 192.168.3.47 TCP_HIT/200 1342082 GET http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz - HIER_NONE/- application/x-gzip
我应该如何修复身份验证失败通过代理服务器正常进行升级?我不想关闭代理服务器(或从客户端排除其配置)来修复此问题。
笔记:
- 对于可能的关闭投票者:当我尝试使用将 18.04 LTS 升级到 20.04 LTS 时也会发生同样的情况
sudo do-release-upgrade -d
。 - 我已经举报错误 1888058到启动板。
- 删除
squid-deb-proxy-client
deb-package 并通过Acquire::http::Proxy "http://192.168.12.34:8000";
in指定代理/etc/apt/apt.conf
不会改变任何内容。
答案1
该问题与您的 squid 代理无关。它无法将下载的文件“focal.tar.gz”与文件“focal.tar.gz.gpg”中的 GPG 密钥进行匹配。
此问题已解决:https://stackoverflow.com/a/62463184/1525392
正如 Hiren 所建议的那样,你必须用以下内容进行替换
/etc/apt/sources.list
但在替换之前请备份此文件。
deb http://in.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
然后,
sudo apt-get install --reinstall ubuntu-keyring
答案2
这里的问题是由于我的代理有旧版本的安装程序文件而引起的。
因此,我通过客户端上的命令触发手动缓存更新来解决了该问题:
cd /tmp
http_proxy=http://192.168.12.34:8000 wget --no-cache -c http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz
http_proxy=http://192.168.12.34:8000 wget -c http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz
在服务器上:
sudo service squid3 restart
sudo service squid-deb-proxy restart
然后升级运行顺利。