cabal不能使用http代理 [英] cabal can't use http proxy

查看:175
本文介绍了cabal不能使用http代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Linux(redhat6)服务器必须使用http代理连接到外部世界。虽然它适用于wget等其他内容,但它不适用于cabal。

  cabal update -v3 

显示如下错误:


407 - 需要代理身份验证cabal:未能下载
http://hackage.haskell.org/packages/archive/00-index。 tar.gz
ErrorMiscUnsucessful HTTP code:407

我试着改变http_proxy环境变量格式化如http:// user:passwd在代理端口,但它也不起作用。



同样的问题已被要求

但我不允许使用像polipo这样的代理服务器,是否有任何其他方式可以使代理服务器工作? 您可以使用 cntlm 与代理交谈。它将处理认证问题。配置并安装 cntlm 后,通过修改 http_proxy https_proxy 等。



您的 cabal 命令应该在此之后生效。


My Linux(redhat6) server has to use http proxy to connect to outside world. While it works for other things like wget, it doesn't work for cabal.

cabal update -v3

shows errors like this:

407 - proxy authentication required cabal: Failed to download http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Unsucessful HTTP code: 407"

I tried to change http_proxy environment variable to format like http:// user: passwd at proxy:port, but it doesn't work either.

The same problem has been asked here

But I'm not allowed use a proxy server like polipo, is there any other way to make cabal work behind a proxy?

解决方案

You can use cntlm to talk to proxy. It will handle authentication issues. After configuring and installing cntlm, set up the new environmental variable by modifying http_proxy, https_proxy etc.

Your cabal command should work after that.

这篇关于cabal不能使用http代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆