2017-03-08 74 views
1

所以我嘗試安裝ghc-mod-5.4.0.0,它與一堆其他安裝的崩潰:堆棧 - 如何(?力)安裝舊版本的包裝

Error: While constructing the build plan, the following exceptions were encountered: 

In the dependencies for ghc-mod-5.4.0.0: 
    async-2.1.1 must match <2.1 && >=2.0.2 (latest applicable is 2.0.2) 
    cabal-helper-0.7.3.0 must match <0.7 && >=0.6.1.0 (latest applicable is 0.6.3.1) 
    cereal-0.5.4.0 must match <0.5 && >=0.4 (latest applicable is 0.4.1.1) 
    directory-1.3.0.0 must match <1.3 (latest applicable is 1.2.7.1) 
    extra-1.5.1 must match ==1.4.* (latest applicable is 1.4.12) 
    ghc-8.0.2 must match >=7.4 && <7.11 
    haskell-src-exts-1.18.2 must match <1.18 && >=1.16.0.1 (latest applicable is 1.17.1) 
    pipes-4.3.2 must match ==4.1.* (latest applicable is 4.1.9) 
    process-1.4.3.0 must match <1.3 (latest applicable is 1.2.3.0) 
    time-1.6.0.1 must match <1.6 (latest applicable is 1.5.0.1) 
    transformers-0.5.2.0 must match <0.5 (latest applicable is 0.4.3.0) 

Plan construction failed. 

那麼,如何迫使它安裝該版本?有沒有簡單的方法來清除堆棧安裝緩存或類似的東西?

+0

的堆棧。清除緩存應該永遠不需要使用堆棧,因爲它被設計爲可以與很多不同版本一起工作,無論是庫還是可執行文件 – epsilonhalbe

回答

3

我認爲像

stack --resolver lts-4.2 install ghc-mod 

應該做的伎倆,否則我會做沿着cabal get ghc-mod-5.4.0.0stack initstack install有線條的東西。您可能需要安裝/切換到不同的ghc版本或使用相當於--allow-newer

+0

也許我錯過了一些明顯的東西,但是在'stack --resolver lts-4.2 install ghc-mod' ,5.4.0.0隱藏在哪裏? – Gal

+0

堆棧包在某個解析器中有固定版本,https://www.stackage.org/lts-4.2顯示ghc-mod在那裏有正確的版本 – epsilonhalbe