无法编译Glasgow Haskell编译器
./configure checking for gfind... no checking for find... /usr/bin/find checking for sort... /usr/bin/sort checking for ghc... no configure: error: GHC is required unless bootstrapping from .hc files. 256
我想安装Glasgow Haskell Compiler,而./configure要求GHC。 它要求什么样的GHC? 全球强子对撞机? 我从http://www.haskell.org/ghc/download_ghc_7_6_3下载了源代码
从apt-cache show ghc
的结果:
The Glasgow Haskell Compilation system (GHC) is a compiler for Haskell.
要安装ghc,请打开终端并输入:
sudo apt-get install ghc
创建一个示例Haskell源文件example.hs,其中包含: main = putStrLn "Hello, World!"
要编译example.hs,请使用cd
将目录更改为包含example.hs的目录,然后键入:
ghc -o example example.hs
要运行可执行文件:
./example