Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 使用阴谋集团安装HTF时出现问题_Haskell_Ghc_Cabal_Htf - Fatal编程技术网

Haskell 使用阴谋集团安装HTF时出现问题

Haskell 使用阴谋集团安装HTF时出现问题,haskell,ghc,cabal,htf,Haskell,Ghc,Cabal,Htf,我正在尝试安装HTF。然而,在我阴谋集团安装HTF后,我得到以下信息: Resolving dependencies... Configuring HTF-0.10.0.7... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package regex-base-0.93.2 r

我正在尝试安装HTF。然而,在我
阴谋集团安装HTF
后,我得到以下信息:

Resolving dependencies...
Configuring HTF-0.10.0.7...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package regex-base-0.93.2 requires mtl-2.0.1.0
package aeson-0.6.0.2 requires mtl-2.1.2
package HTF-0.10.0.7 requires mtl-2.1.2
package mtl-2.0.1.0 requires transformers-0.2.2.0
package transformers-base-0.4.1 requires transformers-0.3.0.0
package mtl-2.1.2 requires transformers-0.3.0.0
package monad-control-0.3.1.4 requires transformers-0.3.0.0
Building HTF-0.10.0.7...
Preprocessing library HTF-0.10.0.7...
ghc: could not execute: cpphs
cabal: Error: some packages failed to install:
HTF-0.10.0.7 failed during the building phase. The exception was:
ExitFailure 1
我尝试过安装其他版本,但遇到了不同的问题。例如
使用
cabal install'HTF时,第一个问题是您有
regex base
构建于
mtl-2.0.1.0
,因此

包regex-base-0.93.2需要mtl-2.0.1.0
包aeson-0.6.0.2需要mtl-2.1.2
HTF
将取决于多个版本的
mtl
。这很少奏效

解决方法是
$ghc pkg unregister regex base
。如果
ghc-pkg
警告说这会破坏其他包,那么您也必须重新构建这些包。如果有太多手工操作,你可以考虑删除你的整个用户包DB(我希望所有的包都是用户安装的,如果它们是全局安装的,你不能删除你的整个全局数据库),并用<代码> Cabar安装Word < /C> >重建所有的东西。

删除
regex base
后,任何内容都不再依赖于
mtl-2.0.1.0
,依赖关系应该不会导致冲突;在实际安装
HTF
之前,您应该使用

cabal安装HTF——试运行
如果仍然存在冲突,那么应该检测到它们,您可以通过注销更多的包来帮助解决它们

下一个问题是

ghc:无法执行:cpphs

这看起来好像在
路径中没有
cpph
。您可能尚未安装它,在这种情况下,您需要在安装
HTF
之前安装它,或者需要将安装它的目录添加到
路径

修复软件包数据库最可靠的方法是删除主目录中包含本地软件包数据库的
~/.ghc/
文件夹。这将有效地重置所有本地安装的包(与Haskell平台安装的全局安装包相反),但不会扰乱任何全局状态。这有助于
cabal
找到摆脱依赖本地最小值的方法,该最小值是您在安装以前锁定在某些依赖项中的包时创建的。
Resolving dependencies...
Downloading QuickCheck-1.2.0.1...
Configuring QuickCheck-1.2.0.1...
Building QuickCheck-1.2.0.1...
Preprocessing library QuickCheck-1.2.0.1...
[1 of 8] Compiling Test.QuickCheck  ( Test/QuickCheck.hs, dist/build/Test/QuickCheck.o )
[2 of 8] Compiling Test.QuickCheck.Batch ( Test/QuickCheck/Batch.hs, dist/build/Test/QuickCheck/Batch.o )
[3 of 8] Compiling Test.QuickCheck.Utils ( Test/QuickCheck/Utils.hs, dist/build/Test/QuickCheck/Utils.o )
[4 of 8] Compiling Test.QuickCheck.Poly ( Test/QuickCheck/Poly.hs, dist/build/Test/QuickCheck/Poly.o )
[5 of 8] Compiling Debug.QuickCheck.Poly ( Debug/QuickCheck/Poly.hs, dist/build/Debug/QuickCheck/Poly.o )
[6 of 8] Compiling Debug.QuickCheck.Utils ( Debug/QuickCheck/Utils.hs, dist/build/Debug/QuickCheck/Utils.o )
[7 of 8] Compiling Debug.QuickCheck ( Debug/QuickCheck.hs, dist/build/Debug/QuickCheck.o )
[8 of 8] Compiling Debug.QuickCheck.Batch ( Debug/QuickCheck/Batch.hs, dist/build/Debug/QuickCheck/Batch.o )
Registering QuickCheck-1.2.0.1...
Installing library in /home/xxx/.cabal/lib/QuickCheck-1.2.0.1/ghc-7.4.1
Registering QuickCheck-1.2.0.1...
Downloading HTF-0.1...
Configuring HTF-0.1...
Building HTF-0.1...
Preprocessing library HTF-0.1...
[1 of 8] Compiling Test.Framework.Utils ( Test/Framework/Utils.hs, dist/build/Test/Framework/Utils.o )
[2 of 8] Compiling Test.Framework.Process ( Test/Framework/Process.hs, dist/build/Test/Framework/Process.o )

Test/Framework/Process.hs:45:48:
    Ambiguous type variable `a0' in the constraints:
      (Show a0)
        arising from a use of `show' at Test/Framework/Process.hs:45:48-51
      (Control.Exception.Exception a0)
        arising from a use of `Control.Exception.handle'
        at Test/Framework/Process.hs:45:5-28
    Probable fix: add a type signature that fixes these type variable(s)
    In the expression: show e
    In the first argument of `return', namely
      `([], show e, error (show e))'
    In the expression: return ([], show e, error (show e))
cabal: Error: some packages failed to install:
HTF-0.1 failed during the building phase. The exception was:
ExitFailure 1