【问题标题】:Building GHC: configure fails on happy despite successful cabal install构建 GHC:尽管 cabal 安装成功,但配置仍然失败
【发布时间】:2017-07-05 19:39:40
【问题描述】:

我正在尝试从this page 之后的源代码构建 GHC。安装依赖时,我不得不安装happyalex

$ 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

但在运行 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.

我在 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

谁能建议我可以尝试解决此问题的明显步骤?

【问题讨论】:

  • 您还必须将happyalex 安装为Ubuntu 软件包:sudo apt-get install alex happy
  • @WillemVanOnsem 完美,谢谢!!

标签: haskell ghc cabal happy


【解决方案1】:

我怀疑您的 PATH 中根本没有它们。确保包含类似

的内容
PATH="$HOME/.cabal/bin:$PATH"

在您的 .bashrc(或您使用的任何 shell 的启动文件)中。通过包管理器安装它们只需将它们安装在 PATH 中已经存在的位置。

即使你现在有工作,你也应该考虑修改你的 .bashrc,因为它在你的脑海中是新鲜的,因为其他 cabal-install'd 的可执行文件将来会被放在那里。

【讨论】:

  • 非常感谢 Daniel,我现在已经相应地设置了我的 .bashrc 文件
【解决方案2】:

您也应该将alexhappy 安装为Debian 软件包。在 Debian 机器上,您可以使用 apt-get

sudo apt-get install alex happy

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-28
    • 2018-08-08
    • 1970-01-01
    • 2015-11-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多