Understanding cabal dependency messages

五迷三道 提交于 2019-12-24 08:56:47

问题


currently when I try to install GOA I get the following message :

>sudo cabal install goa
Resolving dependencies...
In order, the following would be installed:
directory-1.1.0.2 (reinstall) changes: filepath-1.3.0.0 -> 1.2.0.1
process-1.0.1.5 (new version)
goa-3.1 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
....

My question is whether this means that I currently have "filepath-1.3.0.0" as default, and cabal (upon a --force-reinstalls) is going to override this and make "filepath-1.2.0.1" as default? The reason I am a bit confused is that when I look in the location :

cabal/packages/hackage.haskell.org/filepath

I find both 1.2.0.1 & 1.3.0.0 present. Furthermore the command "cabal list filepath" indicates that both packages are installed (see "Installed versions: 1.2.0.1, 1.3.0.0" in the below) :

>cabal list filepath
......
* filepath
    Synopsis: Library for manipulating FilePaths in a cross platform way.
    Default available version: 1.3.0.1
    Installed versions: 1.2.0.1, 1.3.0.0
    Homepage: http://www-users.cs.york.ac.uk/~ndm/filepath/
    License:  BSD3

回答1:


Right now, you have directory-1.1.0.2 installed and built with filepath-1.3.0.0.

The issue here is that you're installing goa which requires filepath (≥1.1 & <1.3), and directory (≥1.0 & <1.2). You already have all the right packages installed, but directory was built with a too new version of filepath. Cabal-install's solution to this conflict is to rebuild directory so that it uses the older version of filepath. All of this is done because you shouldn't have multiple versions of the same package in the dependencies of a package (goa in this case).



来源:https://stackoverflow.com/questions/13726483/understanding-cabal-dependency-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!