4
votes

I generally find that cabal install's for more than half of big packages fail, rather a fatal flaw to new users!

This time I am trying to install yesod, any hints?

> cabal install yesod
  ...
Loading package time-1.2.0.5 ...

GHCi runtime linker: fatal error: I found a duplicate definition for symbol
   _get_current_timezone_seconds
whilst processing object file
   C:\Users\guthrie\AppData\Roaming\cabal\time-1.2.0.5\ghc-7.4.1\HStime-1.2.0.5.o
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHCi cannot safely continue in this situation.  Exiting now.  Sorry.

cabal: Error: some packages failed to install:
authenticate-1.3.1.1 depends on http-conduit-1.6.1.1 which failed to install.
http-conduit-1.6.1.1 failed during the building phase. The exception was:
ExitFailure 1
yesod-1.1.1.2 depends on yesod-core-1.1.2.1 which failed to install.
yesod-auth-1.1.1.1 depends on yesod-core-1.1.2.1 which failed to install.
yesod-core-1.1.2.1 failed during the building phase. The exception was:
ExitFailure 1
yesod-form-1.1.3 depends on yesod-core-1.1.2.1 which failed to install.
yesod-json-1.1.0 depends on yesod-core-1.1.2.1 which failed to install.
yesod-persistent-1.1.0 depends on yesod-core-1.1.2.1 which failed to install.
2
This is potentially an issue with your version of cabal (or perhaps the Windows version of cabal). I just ran the installation process successfully from cabal 1.14.0 from Debian Wheezy.Inaimathi
C:\Users\me>cabal --version cabal-install version 0.14.0 using version 1.14.0 of the Cabal libraryguthrie

2 Answers

2
votes

yesod uses a different version of alex package than the Haskell platform. I always install alex and happy from my distro's package manager apart from ghc and then use cabal. Alternatively, you can always use

cabal update && cabal install alex happy
cabal install yesod-platform
0
votes

This most likely occurs due to trying to install with two versions of the time package simultaneously. Can you try running cabal install yesod-platform and see if the problem persists?

And as @Inaimathi said, this might be due to an older version of cabal. Perhaps also try cabal update && cabal install cabal-install.