我正在解决一些exercism.io
Haskell问题。遗憾的是,stack test
在尝试安装hspec
时失败。
我真的不知道如何调试这个。我很感激任何帮助。
输出:
$ stack install hspec
quickcheck-io-0.1.3: configure
quickcheck-io-0.1.3: build
hspec-expectations-0.7.2: configure
hspec-expectations-0.7.2: build
Progress: 2/4
-- While building package hspec-expectations-0.7.2 using:
/Users/me/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/me/projects/excercism.io/haskell/space-age/.stack-work/logs/hspec-expectations-0.7.2.log
Configuring hspec-expectations-0.7.2...
Building hspec-expectations-0.7.2...
Preprocessing library hspec-expectations-0.7.2...
<command line>: cannot satisfy -package-id HUnit-1.3.1.1-21JuQs5D85SLjuJsLVrBpA
(use -v for more information)
-- While building package quickcheck-io-0.1.3 using:
/Users/me/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/me/projects/excercism.io/haskell/space-age/.stack-work/logs/quickcheck-io-0.1.3.log
Configuring quickcheck-io-0.1.3...
Building quickcheck-io-0.1.3...
Preprocessing library quickcheck-io-0.1.3...
<command line>: cannot satisfy -package-id HUnit-1.3.1.1-21JuQs5D85SLjuJsLVrBpA
(use -v for more information)
所有日志文件看起来基本相同。运行stack install -v hspec
时不会改变。
# /Users/me/projects/excercism.io/haskell/space-age/.stack-work/logs/hspec-expectations-0.7.2.log
Building hspec-expectations-0.7.2...
Preprocessing library hspec-expectations-0.7.2...
<command line>: cannot satisfy -package-id HUnit-1.3.1.1-21JuQs5D85SLjuJsLVrBpA
(use -v for more information)
me:space-age λ less /Users/me/projects/excercism.io/haskell/space-age/.stack-work/logs/hspec-expectations-0.7.2.log
调试信息:
$ stack --version
Version 1.2.0 x86_64 hpack-0.14.0
$ type -a stack
stack is /Users/me/.local/bin/stack
答案 0 :(得分:1)
这是由于全球安装了ghc
。
我能够通过删除/Library/Haskell
中的/usr/local/bin/
目录和Haskell符号链接来解决问题。