簡體   English   中英

升級安裝在cabal沙箱中的軟件包

[英]Upgrading packages installed in a cabal sandbox

我在理解如何升級cabal沙箱中的軟件包時遇到了一些麻煩。 我想將esqueleto-1.3.4.5升級到esqueleto-1.3.5並將myapp.cabal更改為依賴於esqueleto >= 1.3.5 && < 1.4

$ cabal --version cabal-install version 1.18.0.2 using version 1.18.1.2 of the Cabal library $ cabal install --upgrade-dependencies Resolving dependencies... cabal: Could not resolve dependencies: trying: esqueleto-1.3.4.5/installed-ac7... (user goal) next goal: myapp (user goal) rejecting: myapp-0.0.0 (conflict: esqueleto==1.3.4.5/installed-ac7..., myapp => esqueleto>=1.3.5 && <1.4) $ cabal --version cabal-install version 1.18.0.2 using version 1.18.1.2 of the Cabal library $ cabal install --upgrade-dependencies Resolving dependencies... cabal: Could not resolve dependencies: trying: esqueleto-1.3.4.5/installed-ac7... (user goal) next goal: myapp (user goal) rejecting: myapp-0.0.0 (conflict: esqueleto==1.3.4.5/installed-ac7..., myapp => esqueleto>=1.3.5 && <1.4)

錯誤在我看來好像cabal正在嘗試使用已安裝的esqueleto版本來解析依賴關系, esqueleto-1.3.4.5/installed-ac7...有人可以解釋一下這是如何工作的嗎?

我的直覺是,我應該使用--upgrade-dependencies要做到這一點,但我也試過--only-dependencies--reinstall

我找到的最簡單的方法就是讓你的沙盒重新開始並重新開始

$ cabal sandbox delete
$ cabal sandbox init
$ cabal install --only-dependencies

您也可以從.cabal-sandbox/<platform>/.cabal-sandbox/<platform>-packages.conf/文件夾中刪除特定的軟件包,但這需要更多的“手術”。 除非您的依賴關系很大並且您需要經常這樣做,否則核選項並不會太煩人。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM