我正在尝试使用official tutorial上提供的安装指南在OSX Lion中安装Idris语言。我已经安装了GMP。这是我得到的错误:
$ cabal install idris
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
[1 of 1] Compiling Main ( /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/Setup.hs, /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/Main.o )
Linking /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/setup ...
setup: The program llvm-config version ==3.3.* is required but it could not be
found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on llvm-general-3.3.5.0 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
llvm-general-3.3.5.0 failed during the configure step. The exception was:
ExitFailure 1
尝试安装没有LLVM的Idris会产生此错误:
$ cabal install idris -f-LLVM
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
答案 0 :(得分:5)
我在OSX Mavericks上遇到了同样的问题。为了让Idris编译,我用homebrew安装gmp,然后我必须执行导出PKG_CONFIG_PATH = / usr / local / Cellar / libffi / 3.0.13 / lib / pkgconfig',然后' ; cabal安装idris -f-LLVM'。我得到了从该站点导出PKG_CONFIG_PATH变量的提示:
https://groups.google.com/d/msg/idris-lang/gxcdvRIA2OI/NqKSd4zHkI4J
Mavericks已经安装了libffi,我不想从源代码安装第二个副本,这就是PKG_CONFIG_PATH技巧帮助我避免的。做' brew info libffi'找到正确的导出路径。希望很快有人会为伊德里斯创造一个自制的配方......
答案 1 :(得分:3)
第一个错误表明您应该安装发行版的LLVM开发包(而不是通过cabal),第二个错误表示您应该安装GCC libffi库的开发包。您使用的Linux发行版是什么?或者你在Windows / Mac上?