سؤال

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?

هل كانت مفيدة؟

المحلول

$ 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.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top