Sve*_*son 4 haskell ghc cabal happy
我试图在此页面之后从源代码构建GHC .安装依赖项时,我必须安装happy并alex:
$ cabal install alex happy
Resolving dependencies...
Configuring alex-3.2.1...
Configuring happy-1.19.5...
Building happy-1.19.5...
Building alex-3.2.1...
Installed alex-3.2.1
Installed happy-1.19.5
Run Code Online (Sandbox Code Playgroud)
但是在运行时configure我收到一条错误消息:
$ ./configure
...
checking for happy... no
checking for version of happy...
configure: error: Happy version 1.19.4 or later is required to compile GHC.
Run Code Online (Sandbox Code Playgroud)
我在Debian上运行stretch:
$ uname -a
Linux <host> 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
任何人都可以建议一个明显的步骤我可以尝试解决这个问题
你应该安装alex和happy作为Debian软件包.在Debian机器上,您可以使用apt-get:
sudo apt-get install alex happy
Run Code Online (Sandbox Code Playgroud)
我怀疑你的PATH上根本就没有它们.确保包含类似的内容
PATH="$HOME/.cabal/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)
在你的.bashrc(或你使用的任何shell的启动文件).通过包管理器安装它们只需将它们安装在PATH上已有的位置即可.
即使你现在有东西工作,你应该考虑修改你的.bashrc,因为其他的cabal-install'd可执行文件将在未来放置.