openSUSE Tumbleweed 上的堆栈设置

Par*_*aub 2 haskell haskell-stack

操作系统:openSUSE Tumbleweed 最新

正如堆栈文档所说,我可以使用 Tumbleweed 上默认存储库中的 zypper 安装堆栈。到 bin 的路径是/usr/bin/stack

我遵循官方主页上的堆栈教程并执行stack new helloworld new-template(有效)。后cd进入文件夹,我想跑stack setup,但是这一次失败:

The GHC located at /usr/bin/ghc failed to compile a sanity check. Please see:

    http://docs.haskellstack.org/en/stable/install_and_upgrade/

for more information. Exception was:
Running /usr/bin/ghc /tmp/stack-sanity-check9034/Main.hs 
-no-user-package-db in directory /tmp/stack-sanity-check9034/
exited with ExitFailure 1



/tmp/stack-sanity-check9034/Main.hs:1:8:
    Could not find module ‘Distribution.Simple’
    Use -v to see a list of the files searched for.
Run Code Online (Sandbox Code Playgroud)

经过一番谷歌搜索后,我仍然不知道如何解决该错误。这就像我错过了一个非常基本的东西。

Eri*_*ikR 5

要强制堆栈下载并使用其自己版本的 ghc(和其他构建工具),请添加:

system-ghc: false
Run Code Online (Sandbox Code Playgroud)

到您的 stack.yaml 文件。