cabal 不断有依赖性问题。真的很累。到目前为止,我已经尝试了许多工作,这是我尝试安装snap的方法:

$ sudo cabal install snap-server
Resolving dependencies...
cabal: cannot configure ListLike-1.1.0. It requires mtl >=1.1.0 && 1.2
For the dependency on mtl >=1.1.0 && 1.2 there are these packages:
mtl-1.1.0.0, mtl-1.1.0.1, mtl-1.1.0.2 and mtl-1.1.1.0. However none of them
are available.
mtl-1.1.0.0 was excluded because mtl-2.0.0.0 was selected instead
mtl-1.1.0.0 was excluded because monads-fd-0.1.0.3 requires mtl ==2.*
mtl-1.1.0.1 was excluded because mtl-2.0.0.0 was selected instead
mtl-1.1.0.1 was excluded because monads-fd-0.1.0.3 requires mtl ==2.*
mtl-1.1.0.2 was excluded because mtl-2.0.0.0 was selected instead
mtl-1.1.0.2 was excluded because monads-fd-0.1.0.3 requires mtl ==2.*
mtl-1.1.1.0 was excluded because mtl-2.0.0.0 was selected instead
mtl-1.1.1.0 was excluded because monads-fd-0.1.0.3 requires mtl ==2.*

I have similar problems installing Happstack, etc. What is the procedure to make cabal...work?I've already tried:

export PATH=/home/user/.cabal/bin:$PATH

最佳答案

问题在于,snap-server-0.2.15对monads-fd有无限的依赖性。最新版本monads-fd-0.1.0.3需要mtl-2。*不幸的是,这与对ListLike的依赖(通过iteratee)冲突,后者的mtl
尝试运行cabal install snap-server --constrain="monads-fd=0.1.0.2"。这将强制使用不需要mtl的monads-fd的早期版本,我认为一切都会正常运行。

如果您在使用许多软件包时遇到问题,则可能是由于最近上传了新的mtl。您可以尝试添加--constrain="mtl<2",这可能会有所帮助。

对维护者的道德感:遵循Haskell PVP,并且始终使用上限依赖范围。

N.B.即使我确实上传了一个与mtl-2兼容的新ListLike(我很快就会这样做),也无法解决您的问题,因为由于iteratee的上限,因此不会选择新的ListLike。

07-27 13:42