saravanansh has asked for the wisdom of the Perl Monks concerning the following question:

I was not able to install GMP library, Math::GMP on a linux machine A. On machine A, if I tried to run perl Makefile.PL I got the following error message: "No library found for -lgmp". What caused machine A fail to find the gmp library? Please do the needful at the earliest
  • Comment on Could't find gmp library after installing Perl Module

Replies are listed 'Best First'.
Re: Could't find gmp library after installing Perl Module
by almut (Canon) on Dec 23, 2008 at 15:26 UTC
    What caused machine A fail to find the gmp library?

    Maybe you don't have the gmp library installed. Or you do have it installed, but in a non-standard location...

    Have you built it yourself, or did you install a pre-built package (e.g. libgmp3c2 + libgmp3-dev, for Debian) for your distro?

      Is it possible to install libgmp3c2 libgmp3-dev this package for RHEL 5.0

        Presumably, the packages are named differently (my guess would be something like gmp and gmp-devel)... You could try

        yum search gmp

        or

        yum list '*gmp*'

        to get a listing of potential candidates, and then "yum info <package-name>" to get package details.

        (presuming you have yum, that is, which I think comes with RHEL 5 — but I'm no Red Hat expert...)

        Note that you'll need the development (-devel) package, for the header files, in addition to the regular package containing the compiled library itself.

        Is it possible to install libgmp3c2 libgmp3-dev this package for RHEL 5.0

        The gmp library usually builds easily on linux, so you could just grab the source from http://gmplib.org and build it yourself if you like.

        Just unpack the source and run './configure && make && make check'. If all goes well then run 'sudo make install'.

        Cheers,
        Rob