无法配置代理 apt,安装了 SonaType Nexus 3,在安装过程中指示匿名访问权限。为 ubuntu 20.04 创建了 apt 代理。我复制了链接,在客户端机器上创建了 /etc/apt/apt.conf.d/01proxy 文件
Acquire::http::Proxy "http://192.168.66.226:8081/repository/apt/";
Acquire::https::Proxy "DIRECT";
我输入了apt update命令,输出为:
Ign:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu focal InRelease
Ign:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu focal-security Release
404 Not Found [IP: 192.168.66.226 8081]
Ign:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu focal Release
404 Not Found [IP: 192.168.66.226 8081]
Err:7 http://archive.ubuntu.com/ubuntu focal-updates Release
404 Not Found [IP: 192.168.66.226 8081]
Err:8 http://archive.ubuntu.com/ubuntu focal-backports Release
404 Not Found [IP: 192.168.66.226 8081]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' no longer has 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 focal Release' no longer has 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 focal-updates Release' no longer has 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 focal-backports Release' no longer has 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.
如果您通过浏览器访问本地网络上的链接http://192.168.66.226:8081/repository/apt/,它会将您重定向到http://archive.ubuntu.com/ubuntu/