How to configure cabal in Windows 7?

久未见 提交于 2019-12-03 17:41:57

问题


I have installed Haskell Platform 2012 in Windows 7. I write in the console cabal update and I take a message that there is a new version of cabal. I write cabal install cabal-install . After installation finishes it tells me that the cabal has been installed in C:\username\AppData\Roaming\cabal. So when I do cabal update again I am taking the same message that I have to install the new version of cabal. I have tried to change the cabal directory from the config file but cabal ignores the config file. Is Haskell working only on Unix? Thanks


回答1:


The problem is that the cabal executable that came with Haskell Platform gets picked up instead of the one that you installed.

You need to edit the value of the PATH environment variable and place %AppData%\cabal\bin before %PROGRAMFILES%\Haskell Platform\...\bin so that it's given higher priority.




回答2:


You need to add C:\username\AppData\Roaming\cabal (or whatever directory now has the cabal executable -- use e.g. dir or your favorite file manager to verify that you have the right place) to your %PATH% environment variable and restart your command prompt.




回答3:


The error message is incomplete. Install cabal-install globally as:

cabal install cabal-install --global


来源:https://stackoverflow.com/questions/15461085/how-to-configure-cabal-in-windows-7

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