如何安装`帽子`

时间:2014-07-31 21:43:33

标签: debugging haskell cabal cabal-install hat

我正在尝试获取Hat调试器。当我尝试:

cabal install hatcabal install hat -v

最后我得到:

configure: error: in `/tmp/terminfo-0.4.0.0-17745/terminfo-0.4.0.0':
configure: error: curses headers could not be found, so this package cannot be built
See `config.log' for more details
Failed to install terminfo-0.4.0.0
cabal: Error: some packages failed to install:
haskeline-0.7.1.3 depends on terminfo-0.4.0.0 which failed to install.
hat-2.8.0.0 depends on terminfo-0.4.0.0 which failed to install.
terminfo-0.4.0.0 failed during the configure step. The exception was:
ExitFailure 1

我尝试解决问题:

cabal install terminfo

得到:

configure: error: in `/tmp/terminfo-0.4.0.0-18341/terminfo-0.4.0.0':
configure: error: curses headers could not be found, so this package cannot be built
See `config.log' for more details
Failed to install terminfo-0.4.0.0
cabal: Error: some packages failed to install:
terminfo-0.4.0.0 failed during the configure step. The exception was:
ExitFailure 1

如何安装Hat

2 个答案:

答案 0 :(得分:8)

假设您使用某种类型的Linux,应该有一个类似“libncurses5-dev”的系统包(这是Ubuntu中的名称),您可以安装它来获取curses头。

答案 1 :(得分:1)

一旦在系统上安装了curses,

cabal install terminfo --extra-include-dirs=/path/to/curses/include --extra-lib-dirs=/path/to/curses/lib

当然适当替换/path/to/curses

您平台的软件包管理器也可以直接安装terminfo,或者您可以使用单独的软件包管理器,即Nix package manager(特别受Haskellers欢迎)。