Haskell openSUSE Tumbleweed上的堆栈设置

Haskell openSUSE Tumbleweed上的堆栈设置,haskell,haskell-stack,Haskell,Haskell Stack,OS:openSUSE风滚草最新版本 正如stack文档所说,我可以在Tumbleweed上的默认存储库中使用zypper安装stack。到bin的路径是/usr/bin/stack 我遵循官方主页上的堆栈教程,执行了stack new helloworld new template(有效)。将cd放入文件夹后,我尝试运行堆栈设置,但此设置失败,原因是: The GHC located at /usr/bin/ghc failed to compile a sanity check. Pleas

OS:openSUSE风滚草最新版本

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

我遵循官方主页上的堆栈教程,执行了
stack new helloworld new template
(有效)。将
cd
放入文件夹后,我尝试运行
堆栈设置
,但此设置失败,原因是:

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.

在谷歌搜索了一段时间后,我仍然不知道如何解决这个错误。好像我错过了一件非常基本的事情。

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


到stack.yaml文件。

在stack.yaml文件中,尝试添加/设置
系统ghc:false
并重新运行堆栈设置。您希望stack下载并安装自己的ghc(它将放置在~/.stack中),而不使用系统提供的版本/usr/bin/ghc。谢谢。请将此作为答案发布,以便我将问题标记为已解决。谢谢!!2天后我终于找到了解决办法。。干杯
system-ghc: false