cabal安装镜头:找不到-lHStransformers-compat-0.3.3.4-ghc7.8.3的库

时间:2014-12-11 04:22:33

标签: haskell cabal lens

这是在Mac OS X上使用brew安装的ghc和cabal-install。最新版本。 ghc 7.8.3

当我运行cabal install lens时,我收到此错误输出:

Resolving dependencies...
[1 of 1] Compiling Main             ( /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/setup.hs, /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/Main.o )
Linking /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/setup ...
Configuring distributive-0.4.4...
Building distributive-0.4.4...
Preprocessing library distributive-0.4.4...
[1 of 2] Compiling Data.Distributive.Generic ( src/Data/Distributive/Generic.hs, dist/build/Data/Distributive/Generic.o )
[2 of 2] Compiling Data.Distributive ( src/Data/Distributive.hs, dist/build/Data/Distributive.o )
ld: library not found for -lHStransformers-compat-0.3.3.4-ghc7.8.3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Failed to install distributive-0.4.4
<snip>
Loading package primitive-0.5.3.0 ... <command line>: can't load .so/.DLL for: libHSprimitive-0.5.3.0.dylib (dlopen(libHSprimitive-0.5.3.0.dylib, 9): image not found)
Failed to install vector-0.10.12.2
cabal: Error: some packages failed to install:
<snip>

cabal -V收益:

cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library 

1 个答案:

答案 0 :(得分:0)

GHC 7.8.3将transformers-0.3.0.0作为启动包分发,因此您将要使用这两个包:

transformers-0.3.0.0
transformers-compat-0.3.3.3

安装lens

时执行此命令
cabal install --constraint=transformers\ installed lens

通过将此行添加到该文件的末尾,可以通过向~/.cabal/config文件添加全局约束来避免替换启动包。

constraint: transformers installed