How to install `Hat`

佐手、 提交于 2019-12-20 02:54:53

问题


I am trying to get the Hat debugger. When I try:

cabal install hat OR cabal install hat -v

At the end I get:

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

So trouble shooting I try:

cabal install terminfo

And get:

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

What do I do to install Hat?


回答1:


Assuming you're on a Linux of some sort, there should be a system package like "libncurses5-dev" (that's the name in Ubuntu) that you can install to get the curses headers.




回答2:


Once you have curses installed on your system,

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

of course with the appropriate replacement of /path/to/curses.

Your platform's package manager might also be able to install terminfo directly, or you might use a separate package manager, i.e. the Nix package manager (which is particularly popular with Haskellers).



来源:https://stackoverflow.com/questions/25069434/how-to-install-hat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!