我想在webfaction共享服務器上安裝一個Hamlet,這樣我就可以在那裏編譯和運行我的web應用程序。我正在使用Yesod來開發應用程序。GHC cabal安裝小村莊失敗並帶有一個模糊的錯誤
我設法從源代碼和引導程序cabal安裝編譯GHC 7。接下來,我做了cabal install hamlet
,並預計它會工作。沒有運氣!
我從cabal/GHC得到以下奇怪的錯誤信息。任何人都可以幫我嗎?
$ cabal install hamlet Resolving dependencies...
Configuring hamlet-0.8.2...
Preprocessing library hamlet-0.8.2...
Building hamlet-0.8.2...
[ 1 of 14] Compiling Text.MkSizeType (Text/MkSizeType.hs, dist/build/Text/MkSizeType.o)
[ 2 of 14] Compiling Text.Shakespeare (Text/Shakespeare.hs, dist/build/Text/Shakespeare.o)
[ 3 of 14] Compiling Text.Hamlet.Parse (Text/Hamlet/Parse.hs, dist/build/Text/Hamlet/Parse.o)
Text/Hamlet/Parse.hs:113:13:
Warning: A do-notation statement discarded a result of type String.
Suppress this warning by saying "_ <- ($) try string "!--"",
or by using the flag -fno-warn-unused-do-bind
[ 4 of 14] Compiling Text.Hamlet.Quasi (Text/Hamlet/Quasi.hs, dist/build/Text/Hamlet/Quasi.o)
[ 5 of 14] Compiling Text.Css (Text/Css.hs, dist/build/Text/Css.o)
[ 6 of 14] Compiling Text.Cassius (Text/Cassius.hs, dist/build/Text/Cassius.o)
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package pretty-1.0.1.2 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package filepath-1.2.0.0 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.6 ... linking ... done.
Loading package unix-2.4.2.0 ... linking ... done.
Loading package directory-1.1.0.0 ... linking ... done.
Loading package process-1.0.1.5 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package transformers-0.2.2.0 ... linking ... done.
Loading package mtl-2.0.1.0 ... linking ... done.
Loading package parsec-3.1.1 ... linking ... done.
Loading package failure-0.1.0.1 ... linking ... done.
Loading package deepseq-1.1.0.2 ... linking ... done.
Loading package text-0.11.0.8 ... linking ... done.
Loading package blaze-builder-0.3.0.1 ... linking ... done.
Loading package blaze-html-0.4.1.1 ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
ghc: mmap 36864 bytes at (nil): Operation not permitted
ghc: Try specifying an address with +RTS -xm<addr> -RTS
cabal: Error: some packages failed to install:
hamlet-0.8.2 failed during the building phase. The exception was:
ExitFailure 1
出於好奇,你爲什麼從源代碼安裝GHC?它可能導致了這個問題? – Tarrasch 2011-05-24 08:03:35
我必須這樣做,因爲通用的GHC 7二進制文件在webfaction上不起作用,而在6.12二進制文件中卻不起作用。我不記得確切的錯誤是什麼,但我嘗試從源代碼編譯GHC 7,它無痛苦地工作。 – 2011-05-24 12:15:19
好的,我只是在不同的(本地)機器上安裝了GHC,並且我剛剛意識到爲什麼GHC的二進制分發版不起作用。在我安裝了二進制GHC後,我得到了錯誤 - 'configure:error:你的ghc安裝似乎不起作用。 它無法編譯一個簡單的程序(有關詳細信息,請參閱config.log)。 如果你從通用的二進制tarball安裝ghc,那麼檢查你是否安裝了'gmp'C庫和頭文件是值得的 。 (在基於Debian的系統上,這個軟件包被稱爲libgmp3-dev。)' 從源代碼安裝固定。 – 2011-06-01 15:28:23