Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Test/HUnit/Base.hs:1:1:
    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.

Error:
Building the HUnit-1.2.4.2 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

like image 633
Diego Saa Avatar asked Oct 24 '12 20:10

Diego Saa


2 Answers

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
like image 98
Pedro Romano Avatar answered Oct 30 '22 10:10

Pedro Romano


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. Just write

sudo apt-get install ghc*-prof

That's how it worked for me

like image 23
GClaramunt Avatar answered Oct 30 '22 12:10

GClaramunt