I was installing the Hackage string-conversions
. However, it fails with the error below.
Configuring string-conversions-0.3.0.3...
Building string-conversions-0.3.0.3...
Preprocessing library string-conversions-0.3.0.3...
[1 of 1] Compiling Data.String.Conversions ( Data/String/Conversions.hs, dist/build/Data/String/Conversions.o )
In-place registering string-conversions-0.3.0.3...
Creating package registration file:
/tmp/pkgConf-string-conversions-0.3.011675.3
cabal: Error: some packages failed to install:
string-conversions-0.3.0.3 failed during the final install step. The exception
was:
/tmp/pkgConf-string-conversions-0.3.011675.3: hGetContents: invalid argument
(invalid byte sequence)
Ubuntu GNOME: 14.10
ghc: 7.6.3
cabal: 1.20.0.2
I have finally figured out the solution.
Rajarshi is right for the locale problem. However, changing the locale temporarily won't work.
The package now correctly installed after changing the locale permanently.
$ locale
If you notice that LANG
is C
or empty, probably it is not configured correctly
$ sudo update-locale LANG=en_US-UTF-8
Log out and log in again