36

I'm trying to get GHC working on Ubuntu. Did the following:

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

Then I tried to create a hsenv environment and got the following:

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).

The key message being here:

Failed to copy optional package ghc-binary from system's GHC:

How do I resolve this problem? It seems to be the only impediment at the moment.

tru.d
  • 555
  • 2
  • 6
  • 23
me2
  • 3,933
  • 4
  • 17
  • 16

1 Answers1

1

It is a hsenvs bug arising from this line. It seems, in recent GHC versions this package was renamed to binary.

But hsenv is an obsolete projects anyways, it is recommended to use new cabal-install or stack.

arrowd
  • 33,231
  • 8
  • 79
  • 110