繁体   English   中英

由于'happy'无法安装,无法安装ghc-mod?

[英]Cannot install ghc-mod due to 'happy' cannot be installed?

在Mac OS X上,由于无法安装名为“happy”的依赖项,我无法安装ghc-mod

bash> cabal install ghc-mod                                                                                           
Resolving dependencies...
Configuring haskell-src-exts-1.17.1...
Failed to install haskell-src-exts-1.17.1
Build log ( /Users/meng/.cabal/logs/haskell-src-exts-1.17.1.log ):
Configuring haskell-src-exts-1.17.1...
setup-Simple-Cabal-1.22.5.0-x86_64-osx-ghc-7.10.3: The program 'happy' version
>=1.19 is required but it could not be found.
cabal: Error: some packages failed to install:
ghc-mod-5.5.0.0 depends on haskell-src-exts-1.17.1 which failed to install.
haskell-src-exts-1.17.1 failed during the configure step. The exception was:
ExitFailure 1
hlint-1.9.31 depends on haskell-src-exts-1.17.1 which failed to install.

任何的想法?

出于某种原因,cabal不会安装可执行的依赖项,但您可以通过手动安装来解决这个问题。

cabal install happy

然后继续进行原始安装。


这个问题通常不会随着堆栈而消失,但解决方案类似

stack install happy

然后继续安装。

似乎程序happy没有安装在你的系统中,因此包依赖于它的包haskell-src-exts-1.17.1 (依赖于ghc-mod)无法安装。

今天的常识,特别是初学者,不是使用工具cabal-install ,而是使用堆栈代替你需要的东西。 包括安装ghc本身。 下载堆栈后我认为你要做的就是运行stack install ghc-mod来安装ghc-mod

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM