如何在Mac OSX上安装haskell readline库? [英] How do you install the haskell readline library on Mac OSX?
问题描述
我将 haskell readline库包装器指向 readline library 。
cabal install readline $
$ cabal install readline
解决依赖关系...
配置readline -1.0.1.0 ...
检查gcc ... gcc
检查C编译器的默认输出文件名... a.out
检查C编译器是否工作...是
检查我们是否正在交叉编译... no
检查可执行文件的后缀...
检查目标文件的后缀... o
检查我们是否正在使用GNU C编译器...是
检查gcc是否接受-g ...是
检查gcc选项以接受ISO C89 ...无需
检查GNUreadline.framework ...检查readline ... no
在-lncurses中检查tputs ...是
在-lreadli中检查readline ne ... yes
检查rl_readline_version ... yes
检查rl_begin_undo_group ... no
configure:error:readline未找到,所以无法构建此包
请参阅`config.log'获取更多细节。
cabal:错误:某些软件包未能安装:
readline-1.0.1.0在配置步骤中失败。例外是:
ExitFailure 1
我通过macports安装了c readline库(使用
如果您的MacPorts安装使用已安装文件的默认路径,请尝试指定在哪里查找C头文件和库:
cabal install readline --extra-include-dirs = / opt / local / include \
--extra-lib-dirs = / opt / local / lib
更新2x :在我的机器上安装了GNU Readline,通过Homebrew而非MacPorts安装,看起来像Haskell readline
库的 configure 脚本需要一些非标准标志来正确找到它的方位。如果上述不起作用,请尝试以下操作:
cabal install readline --extra-include-dirs = / opt / local / include \
--extra-lib-dirs = / opt / local / lib \
--configure-option = --with-readline-includes = / opt / local / include \
--configure-option = - with-readline-libraries = / opt / local / lib
I'm referring to the haskell readline library wrapper to the c readline library.
cabal install readline
output below:
$ cabal install readline
Resolving dependencies...
Configuring readline-1.0.1.0...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Error: some packages failed to install:
readline-1.0.1.0 failed during the configure step. The exception was:
ExitFailure 1
I have the c readline library installed via macports (using sudo port install readline
), but I still get the same error while trying to install the haskell readline library.
If your MacPorts installation uses the default paths for installed files, try specifying where to look for the C headers and libraries:
cabal install readline --extra-include-dirs=/opt/local/include \
--extra-lib-dirs=/opt/local/lib
Update 2x: On my machine with GNU Readline installed via Homebrew rather than MacPorts, it looks like the configure
script for the Haskell readline
library needs some non-standard flags to properly find its bearings. If the above doesn't work, try this:
cabal install readline --extra-include-dirs=/opt/local/include \
--extra-lib-dirs=/opt/local/lib \
--configure-option=--with-readline-includes=/opt/local/include \
--configure-option=--with-readline-libraries=/opt/local/lib
这篇关于如何在Mac OSX上安装haskell readline库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!