问题描述
我将指向。
>解决方案
我将指向。
>解决方案
如果您的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库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!