Trouble Installing HTF with Cabal

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 17:53:52

The first problem is that you have regex-base built against mtl-2.0.1.0, thus

package regex-base-0.93.2 requires mtl-2.0.1.0
package aeson-0.6.0.2 requires mtl-2.1.2

HTF would depend on multiple versions of mtl. That very rarely works.

The solution to that would be to $ ghc-pkg unregister regex-base. If ghc-pkg warns that that would break other packages, you would have to rebuild those too. If there are too many to do it manually, you may consider deleting your entire user package-db (I hope the packages all are user-installed, if they are globally installed, you can't delete your entire global db) and rebuild everything with cabal install world.

After the regex-base is removed, nothing would depend on mtl-2.0.1.0 anymore, and the dependencies should cause no conflict; before actually installing HTF, you should check that with

cabal install HTF --dry-run

If there would still be conflicts, that should detect them, and you could help resolving them by unregistering further packages.

The next problem is

ghc: could not execute: cpphs

That looks as if you have no cpphs in your PATH. Either you haven't installed it, in which case you need to do it before installing HTF, or the directory it is installed in needs to be added to the PATH.

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