How to fix Error 2 when trying to make haskell-platform?
I downloaded the Haskell-platform source from here: http://www.haskell.org/platform/linux.html, installed ghc, and did /.configure. However when I do sudo make, I get the following error:
Preprocessing library HUnit-188.8.131.52…
Could not find module `Prelude’
Perhaps you haven’t installed the profiling libraries for package `base’?
Use -v to see a list of the files searched for.
Building the HUnit-184.108.40.206 package failed
make: *** [build.stamp] Error 2
Does anyone knows how to fix this?
I’m trying to install on Ubuntu 12.04.1 LTS
Instead of trying to install from the sources, simply install the Ubuntu packages, which will be much simpler, with:
$ sudo apt-get install haskell-platform
If you need a local version of the documentation and the profiling libraries, install the additional packages with:
$ sudo apt-get install haskell-platform-doc haskell-platform-prof
Daniel Fisher’s comment led me to the solution. You have to install all the profiling libraries for each of the ghc packages you have installed.
sudo apt-get install ghc*-prof
That’s how it worked for me