我尝试在我的Macbook上安装Haskell已经两天了,但一直没有成功。
我做了以下事情:
$ brew install ghc
好的。现在我正在尝试安装
$ cabal install text
并获取下一个错误消息:
Data/Text.hs:1074:4:
error: invalid preprocessing directive
#-}
^
我已经搜索并找到了 这个。
因此:
brew install gcc48
$ /usr/local/bin/gcc-4.8 --version
gcc-4.8 (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat /usr/local/lib/ghc-7.6.3/settings
[("GCC extra via C opts", " -fwrapv"),
("C compiler command", "/usr/local/bin/gcc-4.8"),
("C compiler flags", " -m64 -fno-stack-protector -m64"),
...
brew install cabal-install
cabal install text
我收到了相同的消息。
我该怎么修复它们?
brew info
很有帮助! - Bartek Banachewicz