我想在Windows上使用Cabal安装'readline'。运行命令时,表示找不到readline。 Cabal是最新的。
命令
cabal install readline
输出
Resolving dependencies...
Notice: installing into a sandbox located at
C:\Users\Michael\Desktop\haskell-project\.cabal-sandbox
Configuring readline-1.0.3.0...
Failed to install readline-1.0.3.0
Build log ( C:\Users\Michael\Desktop\haskell-project\.cabal-sandbox\logs\readline-1.0.3.0.log ):
Configuring readline-1.0.3.0...
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
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... no
checking for tputs in -ltermcap... no
checking for tputs in -lcurses... no
checking for rl_readline_version... 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.3.0 failed during the configure step. The exception was:
ExitFailure 1
这可能是什么原因?
答案 0 :(得分:1)
如果您正在使用包含pacman
的msys发行版(windows haskell平台安装程序附带的发行版应该是这样的发行版),那么您可以使用pacman
来安装readline库,并且这个应该让你链接它。
另请注意,ghc附带haskeline
库,这是一个纯粹的haskell替代readline,更便于携带。