Question

I just made a fresh haskell-platform install on a Linux Mint 12, via apt-get. Everytime I try to install some hackage package with cabal-install, I get a:

couldn't read caba file xxxx.cabal

where xxxx is a dependency of the package I'm installing or the package itself. Based on this thread on haskell cafe and other questions here in SO, I deleted the bytestring package from the index:

tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.0
tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.1

but the errors are still there.

My cabal-install version is:

 $ cabal --version
 cabal-install version 0.10.2
 using version 1.10.1.0 of the Cabal library 

The error is like this:

$ cabal install yesod
Resolving dependencies...
cabal: Couldn't read cabal file "fsnotify/0.0.5/fsnotify.cabal"

Does anyone knows what might be happening?

Was it helpful?

Solution

I'm having the same problem. There's a relevant mailing list thread about this problem at http://haskell.1045720.n5.nabble.com/Cabal-install-fails-due-to-recent-HUnit-td5715081i20.html

I believe the upshot is that the format of the packages files has changed, and the cabal version in use here (I have the same version, obtained from ubuntu oneiric) can't understand the files. You can't even do "cabal install cabal-install".

The mailing list thread just peters out in september 2012 without a clear decision being made, but I think they decided to just ignore the problem. There's not a clear statement of what to do for users like us; I think the only approach possible is to install haskell from scratch, but I don't yet know where to start with that.

EDIT: I fixed this by downloading the latest source package of cabal from http://hackage.haskell.org/packages/archive/cabal-install/1.16.0.2/cabal-install-1.16.0.2.tar.gz, unpacking it and following the instructions in its README to do a local install.

OTHER TIPS

I was having the same problem and I wasn't able to follow Richard's instructions, so I realized I was running version 7.0.?, I uninstalled it using the command $ uninstall-hs, then installed the newest version (7.6.3). Problem solved here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top