Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Cabal to bypass my Windows proxy settings?

Tags:

haskell

cabal

When retrieving packages with Cabal, I frequently get errors with this message:

user error (Codec.Compression.Zlib: premature end of compressed stream)

It looks like Cabal is using my Windows Networking proxy settings (for Privoxy).

From digging around Google, Cabal or its libraries appear to have (had) a problem in this area.

Possible solutions I can see are:

  1. Turn off proxying while using Cabal (not very keen on this one); or

  2. Get a patch and start hacking. I'm hesitant to go down this path, as I'm a complete Haskell noob and I'm not yet comfortable with Darcs; or

  3. Give it the magic "can I haz no proxy" parameter. Hence the question.

like image 361
Brent.Longborough Avatar asked Feb 28 '23 05:02

Brent.Longborough


1 Answers

If I'm reading http://darcs.haskell.org/cabal-install/Distribution/Client/HttpUtils.hs correctly, you should be able to set the environment variable HTTP_PROXY to an invalid value (would "" work?) to get it to go direct.

like image 189
SamB Avatar answered Mar 07 '23 07:03

SamB