使用cabal-dev避免依赖冲突 [英] Using cabal-dev to avoid dependency conflicts
问题描述
目前,我已经按照由Volker Schatz全球安装cabal所规定的全球安装。在了解cabal依赖关系消息中,尝试安装GOA时,我遇到依赖冲突,并且会因此,希望尝试通过cabal-dev安装GOA( cabal-dev by Rogan Creswick )隔离安装(如果我正确理解,未来将包含沙盒功能,请参阅的cabal-sandbox.htmlrel =nofollow> cabal沙盒,但是由于它还在开发中,我想给cabal-dev一个尝试)。
Currently I have cabal installed globally as specified in Installing cabal globally by Volker Schatz. In the post Understanding cabal dependency messages I was getting dependency conflicts when trying to install GOA, and would therefore like to try to install GOA via cabal-dev (cabal-dev by Rogan Creswick) in order to isolate the installation (if I understand it correctly cabal will include a sandboxing feature in the future, see cabal sandbox by Johan Tibell, but since it is still under development I would like to give cabal-dev a try).
问题:所以,因为我的〜/ .cabal
是一个象征性的链接 / usr / local / share / cabal
(按照url 1 ),我将如何使用cabal-dev安装GOA?理想情况下,安装仍然会放在 / usr / local / share / cabal
中,但也可能在专门的目录(如 / usr / local / share / cabal / cabal-dev
Question : So given that my ~/.cabal
is a symbolic link to /usr/local/share/cabal
(as is done in url 1), how would I go about using cabal-dev to install GOA? Ideally the installation would still be placed in /usr/local/share/cabal
, but maybe in a specialised directory like /usr/local/share/cabal/cabal-dev
推荐答案
据了解,cabal-dev的目的是创建一个孤立的环境,仅用于编译项目或具有兼容依赖关系的特定子项目集。您唯一需要做的就是将cabal-dev运行在cabalized项目的目录中,它将为您的所有依赖项找到正确的版本集,并将其本地编译并安装在cabal-dev你的子目录。如果你要求它在一个集中的位置,像/ usr / local / ...,那么你会击败cabal-dev的整个目的。如果您仍然有疑问,请检查virtualenv ... cabal-dev的工作方式有点类似。
As I understand it, the purpose of cabal-dev is to create an isolated environment just for compiling your project or a specific set of subprojects with compatible dependencies. The only thing you need to do is to run cabal-dev in the directory of your "cabalized" project, and it will locate the correct set of version for all your dependencies and compile and install them locally, in "cabal-dev" of your subdirectory. If you asked it to do that in a centralized location, like "/usr/local/...", then you would be defeating the whole purpose of cabal-dev. If you are still in doubt, please check virtualenv... cabal-dev works in a somewhat similar fashion.
这篇关于使用cabal-dev避免依赖冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!