Can't get cabal update to work inside corporate network

痴心易碎 提交于 2019-12-23 09:23:00

问题


I'm trying to use haskell at work. I have installed the HP, but I can't get cabal to update. I assume this is some firewall or dns problem.

$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal.exe: openTCPConnection: host lookup failure for "hackage.haskell.org"

Any ideas of where to start to fix this, or a workaround?


回答1:


There are a number of possibilities. You will, I'm afraid, probably have to talk to your IT department.

  1. There is a flavour of firewall authentication called NTLM that Cabal doesn't support. Its a Microsoft proprietary thing that is only supported by Internet Explorer (whats a little embrace and extend between friends?).

  2. As also suggested, it may be that your firewall is blocking gzip files, or it may even be looking inside them and seeing executable code. You can tell if its this by trying to download a single package with your web browser: if the content is being blocked then you will get a message saying so, and can talk to your IT department about unblocking it.

Alternatively you can do what I did: download the package descriptions and entire archive of latest versions from home, take it to work on a zip drive, and configure it as a local repository for Cabal Install. Sorry, but its been a while and I can't remember exactly how, but you do need both files.



来源:https://stackoverflow.com/questions/8420439/cant-get-cabal-update-to-work-inside-corporate-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!