我的/etc/apt/sources.list
包含:
deb http://ubuntu.mirror.garr.it/ubuntu/ focal main
deb-src http://ubuntu.mirror.garr.it/ubuntu/ focal main
deb-src http://ubuntu.mirror.garr.it/ubuntu/ focal restricted universe multiverse
deb http://ubuntu.mirror.garr.it/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://ubuntu.mirror.garr.it/ubuntu/ focal-updates main restricted universe multiverse
deb http://ubuntu.mirror.garr.it/ubuntu/ focal-security main restricted universe multiverse
deb-src http://ubuntu.mirror.garr.it/ubuntu/ focal-security main restricted universe multiverse
deb http://ubuntu.mirror.garr.it/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://ubuntu.mirror.garr.it/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 update --fix-missing && sudo apt upgrade
我在终端上得到以下输出:
sudo apt update --fix-missing && sudo apt upgrade
Err:1 http://archive.canonical.com/ubuntu focal InRelease
Temporary failure resolving 'proxy_server'
Err:2 http://ubuntu.mirror.garr.it/ubuntu focal InRelease
Temporary failure resolving 'proxy_server'
Err:3 http://ubuntu.mirror.garr.it/ubuntu focal-updates InRelease
Temporary failure resolving 'proxy_server'
Err:4 http://ubuntu.mirror.garr.it/ubuntu focal-security InRelease
Temporary failure resolving 'proxy_server'
Err:5 http://ubuntu.mirror.garr.it/ubuntu focal-backports InRelease
Temporary failure resolving 'proxy_server'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://ubuntu.mirror.garr.it/ubuntu/dists/focal/InRelease Temporary failure resolving 'proxy_server'
W: Failed to fetch http://ubuntu.mirror.garr.it/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'proxy_server'
W: Failed to fetch http://ubuntu.mirror.garr.it/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'proxy_server'
W: Failed to fetch http://ubuntu.mirror.garr.it/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'proxy_server'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'proxy_server'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我尝试安装的任何东西都会出现类似的问题:
$ sudo apt-get install indicator-cpufreq
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package indicator-cpufreq
尝试从Software update
应用程序更改服务器卡在缓存刷新中,或最终返回类似于Failed to fetch one
(窗口不允许我复制和粘贴输出错误)的错误。
有关我的系统的更多信息:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
什么应该进入services.list
and proxy
,问题可能是什么?
编辑#1:我认为我/etc/apt/apt.conf
错了,我希望能在该文件中提供一些帮助。echo "$http_proxy"
不返回任何东西,也不返回任何东西env | grep -i proxy
。设置 --> 代理网络设置为禁用,但如果我检查Manual
我进入proxy-server-ip
“代理 HTTP”字段并且8080
是端口。
编辑#2:我的/etc/apt/apt.conf.d/proxy.conf
包含两行:
Acquire::http::Proxy "http://proxy_server:port/";
Acquire::https::Proxy "http://proxy_server:port/";