我搜索了很多寻找解决方案,其中99%也没有起作用。
我尝试了什么:
export http_proxy=http://x.x.x.x:8080; export https_proxy=$http_proxy
dnf update
/etc/dnf/dnf.conf
中
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://x.x.x.x:8080
proxy_username=username
proxy_password=password
然后
dnf update
在所有情况下,一直说
dnf
Could not resolve proxy
在诸如this的代理设置之后,在
Extra Packages for Enterprise Linux 9 - x86_64 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'epel':
- Curl error (5): Couldn't resolve proxy name for https://mirrors.fedoraproject.org/metalink?repo=epel-9&arch=x86_64&infra=$infra&content=$contentdir [Could not resolve proxy: x.x.x.x:8080]
部分中添加了一个额外的钥匙值
[main]
然后尝试
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://x.x.x.x:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic