我正在为 Docker 构建自己的 Haskell 开发基础映像。我的 Dockerfile 的以下块导致错误(完整消息如下):
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"]
错误是:
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)
在 github 上阅读此问题报告后,我将LANG
参数添加到我的 Dockerfile 中,但它没有帮助。我的容器上是否需要任何其他依赖项来解决此问题?