1
votes

environment:

ubuntu14.04

haskell platform 2014 2.0.0 (ghc 7.8.3,cabal 1.18.13)

stackage:Stackage build for GHC 7.8 + Haskell Platform, 2014-09-24, exclusive

according to http://www.yesodweb.com/page/quickstart , I ran:

dsu@dsu-G41MT-D3:~$ cabal install alex happy yesod-bin
Resolving dependencies...
Configuring ansi-terminal-0.6.1.1...
Configuring alex-3.1.3...
Downloading unix-time-0.3.4...
Failed to install ansi-terminal-0.6.1.1
Last 10 lines of the build log ( /home/dsu/.cabal/logs/ansi-terminal-0.6.1.1.log ):
Configuring asn1-types-0.2.3...
Configuring auto-update-0.1.1.3...
Failed to install alex-3.1.3
Last 10 lines of the build log ( /home/dsu/.cabal/logs/alex-3.1.3.log ):
Failed to install asn1-types-0.2.3
Configuring base-unicode-symbols-0.2.2.4...
Last 10 lines of the build log ( /home/dsu/.cabal/logs/asn1-types-0.2.3.log ):
Failed to install auto-update-0.1.1.3
Last 10 lines of the build log ( /home/dsu/.cabal/logs/auto-update-0.1.1.3.log ):
Configuring base64-bytestring-1.0.0.1...
Configuring blaze-builder-0.3.3.4...
Failed to install base-unicode-symbols-0.2.2.4
Last 10 lines of the build log ( /home/dsu/.cabal/logs/base-unicode-symbols-0.2.2.4.log ):
Failed to install unix-time-0.3.4
Last 10 lines of the build log ( /home/dsu/.cabal/logs/unix-time-0.3.4.log ):
cabal: /home/dsu/.cabal/logs/unix-time-0.3.4.log: does not exist

It simply says "fail to install" and give no any hints.Why use of stackage still has these problems?

3
aside from what jamshidh said I usually do even snap and yesod in a sandbox - you can later use cabal sandbox init --sandobx=[your Path here] to point your projects sandbox back to there and a simple symbolic link to the executables will do - this way you can keep your env. rather clean and --force-reinstalls are usually no problemsRandom Dev
and BTW this looks like the hackage down problem (where it takes really long and cannot download packages) - in this case just do cabal instal ... over and over again till you have every package (I noticed you use stackage but hackage really is 502ing me ATM)Random Dev
@CarstenKönig u give me some hints,finally i switch to inclusive stackage and everything is ok!doofin

3 Answers

1
votes

This generic cabal debugging advice usually finds the problem....

Update the cabal database, try again

cabal update
cabal install ....

Try to install the dependency with the problem separately.... Looking above, it seems I see a few lines that start with "Failed to install....", test these separately.

cabal install base-unicode-symbols

Recurse if necessary.


Download the package that fails,

cabal unpack base-unicode-symbols
cd base-unicode-symbols-*

Configure to see if its dependencies are all loaded

cabal configure

If not, recurse into the troubled package.


Try to build the package

cabal build

If it doesn't work, you now have useful error messages. If you can fix the problem, great, else repost the information here.


Install

cabal install

In more drastic cases, you might want to delete (actually, just move it in case you want it back) your ~/.cabal/* contents, or your ~/.ghc/* contents, but leave this as a last resort, because you will have to reinstall all cabal packages. Also, you might want to keep the contents of ~/.cabal/bin/*.

1
votes

I just updated Stackage Server to use FP Complete's Hackage mirror (which is Amazon S3 powered) instead of Hackage itself. That should make it completely resilient to Hackage downtime. Thanks for raising this issue, we definitely want Stackage to have better uptime guarantees than Hackage.

0
votes

I've encountered the same problem. I have resolved it by temporarily deleting my HTTP_PROXY environment variable to not have cabal try to connect through an unreachable server.