36

我正在尝试GHC在 Ubuntu 上工作。做了以下事情:

sudo apt-get install ghc
sudo apt-get install cabal-install
cabal update
cabal install hsenv

然后我尝试创建一个hsenv环境并得到以下信息:

xx@xx-VirtualBox:~/scm/t1$ hsenv
Creating Virtual Haskell directory structure
Installing GHC
Initializing GHC Package database at /home/xx/scm/t1/.hsenv/ghc_pkg_db
Copying necessary packages from original GHC package database
  Failed to copy optional package ghc-binary from system's GHC: 
    /usr/bin/ghc-pkg process failed with status 1
  Using user-wide (~/.cabal/packages) Hackage download cache directory
Installing cabal config at /home/xx/scm/t1/.hsenv/cabal/config
Installing activate script
Installing cabal wrapper using /home/xx/scm/t1/.hsenv/cabal/config at /home/xx/scm/t1/.hsenv/bin/cabal
Skipping 'cabal update' step, Hackage download cache already downloaded
  to ~/.cabal/packages/. You can update it manually with 'cabal update'
  (from inside or outside the virtual environment).

关键信息在这里:

从系统的 GHC 复制可选包 ghc-binary 失败:

我该如何解决这个问题?这似乎是目前唯一的障碍。

4

1 回答 1

1

这是由这条线hsenv引起的一个错误。看来,在最近的 GHC 版本中,这个包被重命名为.binary

hsenv无论如何都是一个过时的项目,建议使用 newcabal-installstack.

于 2019-06-08T09:38:08.537 回答