2016-01-25 30 views
1

我試圖建立在NixOS一個新Stack項目與GHCJS如下指令編譯器在http://docs.haskellstack.org/en/stable/ghcjs.html錯誤在試圖創建GHCJS編譯

我已經包含在我的stack.yaml文件中的新Stack項目下面的代碼行(全部在一行上,因爲標籤空間似乎給問題):

# Compiler specifying the GHCJS compiler for this project (using improved base). 
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2 
compiler-check: match-exact 
setup-info: 
    ghcjs: source: 
     ghcjs-0.2.0.20151230.3_ghc7.10.2: 
      url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz" 

,我已經檢索到的,當我跑stack setup

Could not parse '/home/lorkaan/pandocJS/stack.yaml': 
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 487, yamlLine = 12, yamlColumn = 17}})) 
See https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md. 
以下錯誤消息

此外,我試圖消除setup-info字段,因爲堆棧抱怨這件事,讓我stack.yaml文件,如:

# Compiler specifying the GHCJS compiler for this project (using improved base). 
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2 
compiler-check: match-exact 

產生此輸出與堆棧設置命令:

Warning: /home/lorkaan/pandocJS/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: compiler 
Preparing to install GHC to an isolated location. 
This will not interfere with any system-level installation. 
Already downloaded.     
The following executables are missing and must be installed: make 

有誰有任何想法爲什麼這會發生?

回答

4
  1. 第一個錯誤是因爲您的YAML配置中的基本語法錯誤。正確的版本應該是:
setup-info: 
    ghcjs: 
     source: 
      ghcjs-0.2.0.20151230.3_ghc7.10.2: 
       url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz" 
  • 第二個錯誤是因爲正是它說:你缺乏make效用。您需要使用您的Linux發行版的軟件包管理系統來安裝make。由於我不知道你在使用哪種發行版,因此我只能推薦簡單地執行$ make命令並查看環境是否足夠智能以指出可以找到哪個包.Ubuntu通常會這樣做。那麼它只是一個apt-get install-在包裝上,或者可能在yum install上,例如在上面。 CentOS和Fedora等。
  • P.S.像你這樣的問題通常會因爲沒有足夠的努力來診斷問題而陷入低谷(或者在一個問題下把兩個完全不同的問題),但是我會給你帶來懷疑的好處,希望你下一次會更加整潔。時間。