Installing ghc binaries on Linux (can't find

I am trying to install the Haskell Platform on Linux for the first time (I'm also a fairly new Linux user). The victim system is a fresh Red Hat system. And everything involved here should be 64 bit.

The directions at the platform website [1] indicate that I need a ghc7.0.3 to boostrap things. They provide a link to a generic binary of ghc-7.0.3 to do this. I fetched this and ran

$ ./configure ...
$ make install ...

as per the directions without incident (it is a binary, so no compilation needed) However, when I tried to run ghci I get the output.

$ ghci
GHCi, version 7.0.3:  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... <command line>: can't load .so/.DLL for: gmp ( cannot open shared object file: No such file or directory)

For some reason ghci cannot find Running ghci ultimately invokes


with a mess of options. I checked the dependencies via ldd

$ ldd /usr/local/lib/ghc-7.0.3/ghc =>  (0x00007fffe5f5c000) => /lib64/ (0x0000003ee7000000) => /lib64/ (0x0000003ee5800000) => /lib64/ (0x0000003ef3000000) => /lib64/ (0x0000003ee5000000) => /usr/lib64/ (0x0000003ee4400000) => /lib64/ (0x0000003ee4c00000) => /lib64/ (0x0000003ee5400000) => /lib64/ (0x0000003ee4800000) => /lib64/ (0x0000003ef3400000)
    /lib64/ (0x0000003ee4000000)

and it shows that it foud libgmp. libgmp is in /usr/local/lib and /usr/local/lib64. I am not sure how to get further with this. Any suggestions?



  • You either add /usr/local/lib and/or /usr/local/lib64 to $LD_LIBRARY_PATH, or add them to /etc/, or (since you already have /usr/lib64/ add a missing symbolic link:

    cd /usr/lib64
    sudo ln -s

    (and perhaps the same for /usr/lib).

    Note that /usr/lib64/ might be a different version from /usr/local/lib64/, make sure ghc can actually be used with the former.