0

でc2hsをインストールしようとしていcabal install c2hsます。~/.cabal/bin事前にバイナリをインストールするように作成しました。

コマンドcabal install c2hsでエラーを取得します。

src/Control/StateTrans.hs:77:1: Warning:
    Module `Prelude' does not export `catch'
[ 3 of 26] Compiling Data.Errors      ( src/Data/Errors.hs, dist/build/c2hs/c2hs-tmp/Data/Errors.o )
[ 4 of 26] Compiling Data.Attributes  ( src/Data/Attributes.hs, dist/build/c2hs/c2hs-tmp/Data/Attributes.o )
[ 5 of 26] Compiling Text.Lexers      ( src/Text/Lexers.hs, dist/build/c2hs/c2hs-tmp/Text/Lexers.o )
[ 6 of 26] Compiling Control.StateBase ( src/Control/StateBase.hs, dist/build/c2hs/c2hs-tmp/Control/StateBase.o )
[ 7 of 26] Compiling Data.NameSpaces  ( src/Data/NameSpaces.hs, dist/build/c2hs/c2hs-tmp/Data/NameSpaces.o )
[ 8 of 26] Compiling C2HS.C.Attrs     ( src/C2HS/C/Attrs.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Attrs.o )
[ 9 of 26] Compiling C2HS.C.Builtin   ( src/C2HS/C/Builtin.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Builtin.o )
[10 of 26] Compiling Paths_c2hs       ( dist/build/autogen/Paths_c2hs.hs, dist/build/c2hs/c2hs-tmp/Paths_c2hs.o )

dist/build/autogen/Paths_c2hs.hs:21:13: Not in scope: `catch'

dist/build/autogen/Paths_c2hs.hs:22:13: Not in scope: `catch'

dist/build/autogen/Paths_c2hs.hs:23:14: Not in scope: `catch'

dist/build/autogen/Paths_c2hs.hs:24:17: Not in scope: `catch'
cabal: Error: some packages failed to install:
c2hs-0.16.5 failed during the building phase. The exception was:
ExitFailure 1

インストールの何が問題になっていますか? ghc のバージョンは 7.6.3 です。

4

2 に答える 2

0

問題は、Mac に 2 つの異なるバージョンの ghc をインストールしたことbrew install ghcでし

最新バージョンの haskell プラットフォームをインストールする必要がありましたが、その前に古いバージョンuninstall-hs only VERSIONbrew unistall ghc.

最新の haskell プラットフォームを再インストールした後、コンパイルは正常に機能します。

他の方法は brew を使用することができますbrew install haskell-platform

于 2013-12-16T02:57:15.030 に答える