Tf-random will not be installed in Docker container

I am building my own base Haskell development image for Docker. The following snippet of my Dockerfile results in an error (full message appears):

ENV LANG en_GB.UTF-8
RUN ["add-apt-repository", "-y", "ppa:hvr/ghc"]
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "cabal-install-1.20", "ghc-7.8.3"]
ENV PATH ~/.cabal/bin:/.cabal/bin:/opt/cabal/1.20/bin:/opt/ghc/7.8.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN ["cabal", "update"]
RUN ["cabal", "install", "cabal-install"]
RUN ["cabal", "install", "happy"]
RUN ["cabal", "install", "alex"]

      

Mistake:

cabal: Error: some packages failed to install:
QuickCheck-2.7.6 depends on tf-random-0.5 which failed to install.
alex-3.1.3 depends on tf-random-0.5 which failed to install.
tf-random-0.5 failed during the final install step. The exception was:
/tmp/pkgConf-tf-random-03817.5: hGetContents: invalid argument (invalid byte sequence)

      

I added an argument LANG

to my Dockerfile after reading this github report , but it didn't help. Are there any other dependencies my container needs to fix this issue?

+3


source to share


1 answer


Try running locale-gen with LANG as argument.



+2


source







All Articles