3

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

cabal install hat或者cabal 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

4

2 回答 2

8

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

于 2014-07-31T21:47:47.410 回答
1

一旦你在你的系统上安装了 curses,

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

当然要适当更换/path/to/curses.

您平台的包管理器也可能能够直接安装 terminfo,或者您可以使用单独的包管理器,即Nix 包管理器(在 Haskellers 中特别流行)。

于 2014-07-31T22:43:44.753 回答