7

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?

Peter Hall
  • 53,120
  • 14
  • 139
  • 204
  • 1
    Do you have a connection to the internet? Do you need a proxy server at work? – fuz Dec 07 '11 at 18:26
  • According to http://stackoverflow.com/questions/1551053/how-do-i-get-cabal-to-bypass-my-windows-proxy-settings , Cabal detects your proxy settings automatically. Is your company blocking gzip files? – Lambda Fairy Dec 07 '11 at 21:13
  • I managed to download a couple of gzip files directly from hackage, so that shouldn't be the problem – Peter Hall Dec 09 '11 at 11:31
  • @PeterHall : if your corporate firewalls are blocking zipped files, you can also download via cabal fetch (see answer provided by Mikhail Glushenkov in http://stackoverflow.com/questions/14112681/installing-packages-via-cabal-from-local-hackage) outside network, and then transfer it to the network and then install via cabal install. – artella Jan 01 '13 at 20:32

1 Answers1

3

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.

Paul Johnson
  • 17,438
  • 3
  • 42
  • 59
  • Thanks. I tried to download packages manually and it worked fine. So there isn't a problem with that. Also I have other browsers installed, which work fine too, so I don't there is any Microsoft proprietary stuff causing problems either. – Peter Hall Dec 09 '11 at 11:32