12

I'm trying to install haskell on ubuntu 11.10 and I'm following the instructions on this website: https://gist.github.com/1524859

But when I type ./configure I get an error message saying:

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

Anyone know what I'm doing wrong?

jrg
  • 60,101
  • 54
  • 172
  • 246
Tasha D
  • 121
  • 1
  • 3
  • 1
    Make sure to install the dependencies first, `libgmp` seems to be among them. `sudo apt-get install libgmp3-dev freeglut3 freeglut3-dev` – mikewhatever Jan 13 '12 at 05:25
  • Okay I tried that and it's telling me the it is already the newest version. So I tried ./configure again and still the same error. Any more suggestions? – Tasha D Jan 17 '12 at 23:26
  • 1
    I'm on 12.04 but where the current libgmp is libgmp.so.10, maybe the same as 11.10. Have you tried installing ghc & seeing if it suitable for your needs? – doug Jan 18 '12 at 00:38
  • 1
    Okay fixed it with sudo ln -s /usr/lib/libgmp.so.10.0.1 /usr/lib/libgmp.so.3 – Tasha D Jan 18 '12 at 00:46
  • 1
    @TashaD: Providing the solution in the comment is nice, but even nicer is a self-answer (look it up on meta), to document for others, that there is an answer to the question, and mark it (√) as accepted answer, which signals, the problem is solved. Of course, now that Jorge wrote the answer, just accept it. – user unknown Feb 04 '12 at 03:30
  • The solutions above work if you downloaded GHC for the right architecture, that is, if they don't work for you, re-check your download. – Carlos López-Camey May 27 '12 at 20:11

3 Answers3

12

I was able to solve this by just installing the right packages (no linking).

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

I'll note that I already had these dependencies installed:

make libssl-dev build-essential curl git-core
jokerdino
  • 41,000
  • 24
  • 132
  • 201
stew
  • 121
  • 2
7

Op fixed this with:

sudo ln -s /usr/lib/libgmp.so.10.0.1 /usr/lib/libgmp.so.3
Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
1

This worked for me (Ubuntu 13.04 x86_64) with the slight change

sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 /usr/lib/libgmp.so.3
ImAlsoGreg
  • 111
  • 3