Cabal 安装抱怨“:0:4: 词法错误(UTF-8 解码错误)”
我使用的是 Windows 7,区域设置为 zh_CN 和 ghc-7.0.4
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
I am using Windows 7 with locale zh_CN and ghc-7.0.4
Default code page of the cmd.exe is 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
I have tried change code page and re-install again, but get the same output.
> chcp 65001
> cabal install ghc-mod
Some packages can be built successfully:
xml-1.3.12
textmath-0.6.0.3
tagsoup-0.12.6
Some packages would fail:
temporary-1.1.2.3
utf8-string-0.3.7
pandoc-types-1.9.0.2
json-0.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题。
我不知道原因是否相同,但
在运行 cabal 之前先尝试一下。就我而言,这解决了问题。
I encountered the same problem.
I don't know if the cause is the same, but try
before you run cabal. In my case, that fixed the problem.