1

I'm trying to install the Haskell Platform on Raring. Since there's no apt package, I've downloaded the GHC 7.4.2 binary x86_64 distribution (which is a prerequisite), and I am trying to run ./configure. It's failing with the following message:

checking for path to top of build tree... utils/ghc-pwd/dist/build/tmp/ghc-pwd: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory

configure: error: cannot determine current directory

How can I fix this?

BuZZ-dEE
  • 14,573
hdgarrood
  • 141

1 Answers1

3

Note that I would usually just do sudo apt-get install haskell-platform, which should just sort everything out. However it hasn't been packaged for 13.04 yet.

Get these dependencies, if you don't already have them:

sudo apt-get install -y libgmp3-dev freeglut3 freeglut3-dev

The Haskell platform seems to be looking for a libgmp.so.3, but the libgmp package only supplies libgmp.so, libgmp.so.10 and libgmp.so.10.0.5. The fix:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/libgmp.so.3

(Disclaimer: This worked for me. Not sure if it's a sensible thing to do)

BuZZ-dEE
  • 14,573
hdgarrood
  • 141
  • 3
    They can't package the platform for 13.04 because 13.04 has GHC 7.6, whereas the current platform release requires 7.4. I'd love some reasoning behind the decision to ship 7.6 before the platform's updated to use it, but I haven't found any yet. – Matthew Walton Apr 30 '13 at 13:46
  • Nowadays, you're probably better off just using Stack, which will take care of managing GHC installations for you: http://docs.haskellstack.org/en/stable/README/ – hdgarrood Mar 14 '16 at 19:25
  • Absolutely yes! Stack is brilliant. – Matthew Walton Mar 15 '16 at 08:45