cabal安装scion-browser在Ubuntu 12.04上失败,因为haskeline需要Cabal库版本> = 1.16

时间:2014-02-10 15:12:43

标签: eclipse haskell ubuntu cabal eclipse-fp

我在运行Eclipse 3.7.2和ghc(i)7.4.1的Ubuntu 12.04机器上安装了Eclipse的Haskell插件EclipseFP。每次我启动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

任何帮助都会非常感激,因为我似乎无法在任何错误上找到任何Google点击。

修改

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

[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

3 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:0)

我认为您应该安装较新的cabal库配置消息:该软件包需要Cabal库版本-any&amp;&amp; &GT; = 1.16

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

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

如果没有修复您的PATH。新的cabal二进制文件可能在〜/ .cabal / bin

然后:

cabal install haskeline

答案 2 :(得分:0)

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

cabal install buildwrapper --constraint=aeson==0.6.2.1

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