问题描述
请帮助我,我想使用 wget 命令从 dev.opennebula.org 下载文件,但我遇到了代理问题.现在,我已经在文件/etc/wgetrc 中设置了 http-proxy 值,我使用命令 wget --proxy-username=username --proxy-password=password URL 但结果是
Please help me, I want to download file from dev.opennebula.org using command wget but I have a problem with proxy. Now, I have already set the http-proxy value in file /etc/wgetrc and I use command wget --proxy-username=username --proxy-password=password URL but the result is
Connecting to proxy.mmcs:8080 failed: Connection timed out.
Retrying.
我确定我正确设置了代理名称和端口.我该怎么做以及我可以使用其他命令来下载该文件.
I am sure that I set the proxy name and port correctly. How can I do and can I use other commands to download that file.
谢谢.
推荐答案
在 sudo gedit/etc/bash.bashrc
中添加这些行:
export http_proxy=http://username:[email protected]:port/
export https_proxy=http://username:[email protected]:port/
export ftp_proxy=http://username:[email protected]:port/
在 sudo gedit/etc/environment
中添加这些行:
http_proxy=http://username:[email protected]:port/
https_proxy=http://username:[email protected]:port/
ftp_proxy=http://username:[email protected]:port/
在 sudo gedit/etc/apt/apt.conf
中添加这些行:
Acquire::http::Proxy "http://username:[email protected]:port";
Acquire::https::Proxy "http://username:[email protected]:port";
Acquire::ftp::Proxy "http://username:[email protected]:port";
这篇关于在 Ubuntu 中使用 wget 代理的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!