1
OS:openSUSE的Tumbleweed公司跟上時代的堆棧設置
爲堆棧文件說,我可以用zypper的從坦布爾韋德默認庫安裝堆棧。通往垃圾桶的路徑是/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.
一些谷歌上搜索我仍然不知道怎樣做才能解決錯誤後。這就像我錯過了一件非常基本的事情。
在stack.yaml文件中,嘗試添加/設置'system-ghc:false'並重新運行堆棧設置。您希望堆棧下載並安裝自己的ghc(它將放置在〜/ .stack中),而不是在/ usr/bin/ghc中使用系統提供的版本。 – ErikR
謝謝。請將其發佈爲答案,以便我可以將問題標記爲已解決。 – Paradiesstaub