我使用的是带有区域设置zh_CN和ghc-7.0.4的Windows7
cmd.exe的默认代码页为936。
> cabal install ghc-mod
Resolving dependencies...
Configuring ghc-syb-utils-0.2.1.0...
Preprocessing library ghc-syb-utils-0.2.1.0...
Building ghc-syb-utils-0.2.1.0...
<built-in>:0:4: lexical error (UTF-8 decoding error)
cabal: Error: some packages failed to install:
ghc-mod-1.10.7 depends on ghc-syb-utils-0.2.1.0 which failed to install.
ghc-syb-utils-0.2.1.0 failed during the building phase. The exception was:
ExitFailure 1我尝试更改代码页并重新安装,但得到相同的输出。
> chcp 65001
> cabal install ghc-mod一些包可以成功构建:
xml-1.3.12 textmath-0.6.0.3 tagsoup-0.12.6
一些包可能会失败:
temporary-1.1.2.3 utf8-string-0.3.7 pandoc-types-1.9.0.2 json-0.5
发布于 2012-03-02 20:22:14
我遇到了同样的问题。我不知道原因是不是一样的,但试一试
set LANG=C在你操纵阴谋之前。在我的例子中,这解决了问题。
https://stackoverflow.com/questions/9371438
复制相似问题