如何为 apt-cyg 设置代理?
如何为apt-cyg、http和socks设置代理? 我尝试使用
export http_proxy=
但没有用。
How to set a proxy for apt-cyg, http and socks?
i tried using
export http_proxy=
but it did not work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这应该有效:
This should work :
您还可以将其全部添加到一行中(它与 mobaxterm 中嵌入的 cygwin/apt-get 配合良好 - 将其添加到 .bashrc):
You can also add it all in one line (it works well with cygwin/apt-get embedded in mobaxterm - add it to .bashrc):
我不确定 Cygwin,但这些是我的 ~/.bashrc 中的行
如果 cygwin 与 bash 类似,它应该可以工作。
I'm not sure about Cygwin, but these are the lines from my ~/.bashrc
If cygwin is similar to bash, it should work.
我通过设置两个 Windows 环境变量使其工作:http_proxy 和 http_proxy。我以前有 HTTP_PROXY,但没有被选中。
请注意,由于 Cygwin 是一个 Windows 进程,因此在设置新的环境变量后,您需要启动一个新的 Cygwin 进程来应用更改。
I made it work by setting two Windows environment variables: http_proxy and http_proxy. I previously had HTTP_PROXY, but that wasn't picked up.
Note that as Cygwin is a Windows process, after setting the new environment variables you need to launch a new Cygwin process to pick up the change.
老问题,但似乎没有一个答案是正确的。
据我所知,尝试取消代理以在我的一台机器上运行此代理,我收到此错误:wget:无法解析主机地址“webproxystatic-mywork.com”
看起来 apt-cyg 使用 wget。所以这给你带来了这个问题: 在 wget 中设置代理
答案是:
在
/etc/wgetrc
中设置(或者在我的情况下取消设置)http_proxy
/https_proxy
:Old question, but none of the answers seem right.
From what I can tell trying to UNSET a proxy to run this on one of my boxes, I was getting this error: wget: unable to resolve host address ‘webproxystatic-mywork.com’
Looks like apt-cyg uses wget. So this brings you to this question: setting proxy in wget
The answer of which is:
set (or in my case unset)
http_proxy
/https_proxy
in/etc/wgetrc
: