Question

I am trying to install ncurses and I get the following error.

cabal install ncurses
NCurses.chs.h:9:30: fatal error: ncursesw/ncurses.h: No such file or directory

But I have the header file in /usr/include/ncurses.h.

Is there a way to specify the path manually in cabal?

Something like cabal install ncurses -p /usr/include/ncurses.h?

Was it helpful?

Solution

$ cabal install --help | grep --max-count=1 --after-context=1 include
  --extra-include-dirs=PATH      A list of directories to search for header
                                 files

So I'd guess that cabal install ncurses --extra-include-dirs=/usr/include would probably work.

(The extra arguments to grep are simply to trim down the output and are exactly what I used to find the option.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top