Question

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

Was it helpful?

Solution

I encountered the same problem. I don't know if the cause is the same, but try

set LANG=C

before you run cabal. In my case, that fixed the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top