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

qaz*_*wsx 7 installation haskell ghc-mod

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

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.
Run Code Online (Sandbox Code Playgroud)

任何的想法?

jam*_*idh 11

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

cabal install happy
Run Code Online (Sandbox Code Playgroud)

然后继续进行原始安装.


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

stack install happy
Run Code Online (Sandbox Code Playgroud)

然后继续安装.


sou*_*upi 5

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

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