我的情景:
我正在尝试在我新安装的ubuntu中安装python和postgresql,它在Windows 7上通过virtualbox运行。它使用我的公司网络,我在ubuntu的网络设置中设置了代理。
我可以使用mozilla(ubuntu)浏览和下载没有问题。
问题:
但是当我尝试使用终端安装软件包时,它只停留在0%。它尝试了各种IP,仍然是0% my terminals screenshot
[更新] - 结束无法连接到IP
尝试:
我已尝试通过
导出代理设置sudo -H gedit /etc/profile.d/proxy.sh
并使用
更新文件导出http_proxy = http://username:password@proxyhost:port/
(我也为https设置了
)请让我知道发生了什么问题?
答案 0 :(得分:3)
这将非常简单。我为这个
创建了一个python 3脚本下载并运行它。您可以非常快速地设置和删除系统范围的代理。
步骤:
1)以zip格式下载并解压缩。
2)打开终端并导航到解压缩文件的文件夹。
3)键入以下命令
chmod + x proxy.py
sudo ./proxy.py
欢呼!
答案 1 :(得分:2)
答案 2 :(得分:1)
在Ubuntu中设置代理:
编辑 /etc/apt/apt.conf 文件并添加以下内容:
Acquire::http::proxy "http://ProxyHOST:ProxyPORT/";
Acquire::https::proxy "https://ProxyHOST:ProxyPORT/";
希望它能帮助...... :)
答案 3 :(得分:0)
Acquire::http::proxy "http://edcguest:edcguest@172.31.100.27:3128/";
Acquire::https::proxy "https://edcguest:edcguest@172.31.100.27:3128/";
Acquire::ftp::proxy "ftp://edcguest:edcguest@172.31.100.27:3128/";
Acquire::socks::proxy "socks://edcguest:edcguest@172.31.100.27:3128/";