"cannot determine current directory" while building haskell

8,383

Solution 1

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

Solution 2

Op fixed this with:

sudo ln -s /usr/lib/libgmp.so.10.0.1 /usr/lib/libgmp.so.3

Solution 3

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
Share:
8,383

Related videos on Youtube

Tasha D
Author by

Tasha D

Updated on September 18, 2022

Comments

  • Tasha D
    Tasha D almost 2 years

    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?

    • mikewhatever
      mikewhatever over 12 years
      Make sure to install the dependencies first, libgmp seems to be among them. sudo apt-get install libgmp3-dev freeglut3 freeglut3-dev
    • Tasha D
      Tasha D over 12 years
      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?
    • doug
      doug over 12 years
      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?
    • Tasha D
      Tasha D over 12 years
      Okay fixed it with sudo ln -s /usr/lib/libgmp.so.10.0.1 /usr/lib/libgmp.so.3
    • datacarl
      datacarl over 12 years
      @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.
    • Carlos López-Camey
      Carlos López-Camey about 12 years
      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.
  • David Medinets
    David Medinets about 10 years
    It was the libgmp3c2 package that solved the issue for me.