没有“cabal升级”的最佳解决方法是什么? [英] What's the best workaround for not having "cabal upgrade"?
问题描述
我想升级所有的软件包,而不仅仅是一个特定的软件包,它包含 cabal install --upgrade-dependencies
。
I want to upgrade all packages, not just a specific one with cabal install --upgrade-dependencies
.
推荐答案
这个shell hackery在OS X上适用于我:
This bit of shell hackery works for me on OS X:
cabal list --simple-output --installed | awk '{print $1}' | uniq | xargs -I {} cabal install {} --reinstall
编辑:现在强制重新安装,并避免在存在多个版本时多次安装包。感谢您的评论!
EDIT: Now forces a reinstall, and avoids installing a package more than once when more than one version is present. Thanks for the comments!
编辑年份:现在Cabal沙盒和堆栈存在,我强烈建议不要试图升级软件包。如果你只能消灭现有的沙箱并重新安装最新的依赖关系,那么最终会导致更少的麻烦。
EDIT YEARS LATER: Now that Cabal sandboxes and Stack exist, I strongly recommend against trying to upgrade packages in place. You'll end up with far fewer headaches if you instead can just wipe out an existing sandbox and reinstall up-to-date dependencies.
这篇关于没有“cabal升级”的最佳解决方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!