3

我在运行 Eclipse 3.7.2 和 ghc(i) 7.4.1 的 Ubuntu 12.04 机器上安装了 EclipseFP,即 Eclipse 的 Haskell 插件。每次我启动 Eclipse 时,EclipseFP 都会要求我安装辅助可执行文件 scion-browser (0.2.12) 和 buildrunner (0.7.2),但最终都无法安装。

在命令行上尝试cabal install scion-browser(或)失败cabal install haskeline

Resolving dependencies...
cabal: Error: some packages failed to install:
haskeline-0.7.1.2 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.16 but no
suitable version is installed.)

cabal install buildwrapper失败

Resolving dependencies...
Configuring buildwrapper-0.7.7...
Building buildwrapper-0.7.7...
Preprocessing library buildwrapper-0.7.7...
[1 of 7] Compiling Language.Haskell.BuildWrapper.Base ( src/Language/Haskell/BuildWrapper/Base.hs, dist/build/Language/Haskell/BuildWrapper/Base.o )
[2 of 7] Compiling Language.Haskell.BuildWrapper.GHCStorage ( src/Language/Haskell/BuildWrapper/GHCStorage.hs, dist/build/Language/Haskell/BuildWrapper/GHCStorage.o )

src/Language/Haskell/BuildWrapper/GHCStorage.hs:542:22:
    Couldn't match expected type `scientific-0.2.0.1:Data.Scientific.Scientific'
                with actual type `Number'
    In the pattern: I l
    In the pattern: Number (I l)
    In the pattern: Just (Number (I l))
cabal: Error: some packages failed to install:
buildwrapper-0.7.7 failed during the building phase. The exception was:
ExitFailure 1

任何帮助将不胜感激,因为我似乎无法在任何一个错误上找到任何谷歌点击。

编辑:

重新安装 Haskell 后(似乎我containers安装了两个版本,runhaskell Setup.hs configure --user抱怨得当),我现在可以配置BuildWrapper,但构建它失败并出现以下错误:

[3 of 7] Compiling Language.Haskell.BuildWrapper.GHC ( src/Language/Haskell/BuildWrapper/GHC.hs, dist/build/Language/Haskell/BuildWrapper/GHC.o )

src/Language/Haskell/BuildWrapper/GHC.hs:522:37:
    The function `showPpr' is applied to two arguments,
    but its type `a0 -> String' has only one
    In the second argument of `(++)', namely `showPpr dflags bname'
    In the expression: "show " ++ showPpr dflags bname
    In an equation for `exprS': exprS = "show " ++ showPpr dflags bname
4

3 回答 3

3

BuildWrapper 的问题是由于 Aeson 的重大变化。请参阅https://github.com/JPMoresmau/BuildWrapper/issues/20。您可以从 github 获取 buildwrapper 源代码(修复边界并调整代码)或强制安装 Aeson 0.6。对于 Haskeline 我不确定,您可以尝试自行安装 haskeline 吗?

于 2014-02-10T15:17:25.317 回答
0

我认为您应该安装更新的 cabal 库,并显示消息:该软件包需要 Cabal 库版本 -any && >=1.16。

cabal update
cabal install cabal
cabal install cabal-install
cabal --version

应该是:使用 Cabal 库的 1.20.0.0 版本

如果不修复你的路径。新的 cabal 二进制文件可能在 ~/.cabal/bin

然后:

cabal install haskeline
于 2014-05-24T08:23:40.380 回答
0

在使用 cabal 安装和从源代码构建时,我遇到了同样的错误(函数 `showPpr' 应用于两个参数)。我尝试使用旧版本的 aeson,

cabal install buildwrapper --constraint=aeson==0.6.2.1

小心用你接近0.6.2.1的版本替换aeson版本它产生了很多警告,仍然可以成功构建。

于 2014-07-10T03:09:52.673 回答