我指的是c读取线库的haskell readline库包装器.
cabal install readline 输出如下:
$ 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
Run Code Online (Sandbox Code Playgroud)
我通过macports(使用sudo port install readline)安装了c readline库,但在尝试安装haskell readline库时仍然遇到同样的错误.
acf*_*zer 21
如果您的MacPorts安装使用已安装文件的默认路径,请尝试指定查找C头和库的位置:
cabal install readline --extra-include-dirs=/opt/local/include \
--extra-lib-dirs=/opt/local/lib
Run Code Online (Sandbox Code Playgroud)
更新2x:在我的机器上通过Homebrew而不是MacPorts安装GNU Readline,看起来configureHaskell readline库的脚本需要一些非标准的标志才能正确找到它的方位.如果上述方法无效,请尝试以下方法:
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2749 次 |
| 最近记录: |