My cabal instance, whenever I try to run cabal update
or cabal install foo
keeps giving the error:
Downloading the latest package list from hackage.haskell.org
cabal: Codec.Compression.Zlib: premature end of compressed stream
I'm running cabal version 1.22.0.0
, and GHC version 7.8.4
. I'm on Arch Linux, and using the standard haskell packages from the official repository.
The full error when running cabal update -v3
(after deleting ~/.cabal/) is:
Config file path source is default config file.
Config file /home/username/.cabal/config not found.
Writing default configuration to /home/username/.cabal/config
Downloading the latest package list from hackage.haskell.org
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.22.0.0 (linux; x86_64)
Creating new connection to hackage.haskell.org
Received:
HTTP/1.0 301 Moved Permanently
Server: nginx/1.6.2
Content-Type: text/plain; charset=UTF-8
Location: /packages/index.tar.gz
Accept-Ranges: bytes
Date: Thu, 12 Feb 2015 19:15:22 GMT
Via: 1.1 varnish
X-Served-By: cache-jfk1033-JFK
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1423768522.169450,VS0,VE77
X-Cache: MISS from none
X-Cache-Lookup: MISS from none:3128
Connection: close
301 - redirect
Redirecting to http://hackage.haskell.org/packages/index.tar.gz ...
Sending:
GET /packages/index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.22.0.0 (linux; x86_64)
Creating new connection to hackage.haskell.org
Received:
HTTP/1.0 200 OK
Server: nginx/1.6.2
Content-Type: application/x-gzip
Cache-Control: public, no-transform, max-age=300
Content-MD5: f1640f2ce5cbf266c91d4062ea470689
ETag: "f1640f2ce5cbf266c91d4062ea470689"
Last-Modified: Thu, 12 Feb 2015 19:07:27 GMT
Content-Length: 8825306
Accept-Ranges: bytes
Date: Thu, 12 Feb 2015 19:15:22 GMT
Via: 1.1 varnish
Age: 84
X-Served-By: cache-jfk1023-JFK
X-Cache: HIT
X-Cache-Hits: 1
X-Timer: S1423768522.419600,VS0,VE49
X-Cache: MISS from none
X-Cache-Lookup: MISS from none:3128
Connection: close
Downloaded to /home/username/.cabal/packages/hackage.haskell.org/00-index.tar.gz
cabal: Codec.Compression.Zlib: premature end of compressed stream
There are a few references to this across the web, but a lot of them are very old, and I am still having this problem. I'm behind my university's network which I feel might be part of the issue, but I want to get to the bottom of this and understand what's happening. Thanks in advance!