如何在Almalinux中使用DNF的http_proxy 我想设置HTTP_Proxy,以在不允许Internet的安全环境中下载软件包。 我尝试了设置env vars,但在DNF中没有工作。 我搜寻了很多鳍...

问题描述 投票:0回答:1
我搜索了很多寻找解决方案,其中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
它会起作用,如果没有发表评论。
    
http-proxy dnf almalinux
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.