2012-10-09 260 views
4

我通常發現cabal install的超過一半大包失敗,對新用戶來說是一個致命的缺陷!yesod安裝失敗

這次我想安裝yesod,任何提示?

> 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. 
+0

這可能是您的cabal版本(或可能是cabal的Windows版本)的問題。我只是從Debian Wheezy的'cabal 1.14.0'成功安裝過程。 – Inaimathi

+0

C:\ Users \ me> cabal --version cabal-install版本0.14.0 使用版本1.14.0的Cabal庫 – guthrie

回答

0

這很可能是由於嘗試同時安裝兩個版本的時間包而引起的。您能否嘗試運行cabal install yesod-platform並查看問題是否仍然存在?

而@Inaimathi說,這可能是由於舊版本的cabal。也許也試試cabal update && cabal install cabal-install

+0

謝謝,我在此之前只做了cabal-install的更新。一個yesod平臺的安裝顯示了14件可能會被破壞的事情,並且在「http-conduit-1.6.1無法安裝」的情況下執行強制重新安裝失敗,並試圖單獨安裝它可能會打破另一個61的東西。哎呀。我不確定是否應該繼續下去這個連鎖的多米諾骨牌強制重新安裝,說他們會打破這麼多事情? – guthrie

2

yesod使用與Haskell平臺不同版本的alex軟件包。除了ghc之外,我總是從我的發行版軟件包管理器中安裝alex和happy,然後使用cabal。或者,您可以隨時使用

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