Can't install Perl on Redhat

Posted on 2005-04-08
Last Modified: 2013-12-16
I wasn't sure which category I should place this question in.  If it belongs elsewhere, please let me know - my apologies as well.

I have a server running Redhat Enterprise 4 (64-bit architecture).  It already has Perl (5.8.5) installed.  However, I am trying to install 5.8.6.  Following the instructions in INSTALL, I ran

> sh Configure -de

No problem (I think).  But then, when I run

> make

It crashes with the following errors:

cc -L/usr/local/lib -o miniperl \
    miniperlmain.o opmini.o libperl.a
libperl.a(pp.o)(.text+0x2813): In function `Perl_pp_pow':
: undefined reference to `pow'
libperl.a(pp.o)(.text+0x358d): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x35b5): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x367b): In function `Perl_pp_modulo':
: undefined reference to `fmod'
libperl.a(pp.o)(.text+0x7e33): In function `Perl_pp_atan2':
: undefined reference to `atan2'
libperl.a(pp.o)(.text+0x7f13): In function `Perl_pp_sin':
: undefined reference to `sin'
libperl.a(pp.o)(.text+0x8033): In function `Perl_pp_cos':
: undefined reference to `cos'
libperl.a(pp.o)(.text+0x83a3): In function `Perl_pp_exp':
: undefined reference to `exp'
libperl.a(pp.o)(.text+0x84fd): In function `Perl_pp_log':
: undefined reference to `log'
libperl.a(pp.o)(.text+0x86c7): In function `Perl_pp_sqrt':
: undefined reference to `sqrt'
libperl.a(pp.o)(.text+0x8878): In function `Perl_pp_int':
: undefined reference to `ceil'
libperl.a(pp.o)(.text+0x888e): In function `Perl_pp_int':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x51cf): In function `S_pack_rec':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x51f3): In function `S_pack_rec':
: undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1

I don't know why this error occurs.  It probably has something to do with the 64-bit architecture.  The following webpage might  explain the solution, but I'm not sure how to follow its instructions.

It also may be a shared library problem between the two installations, as this webpage indicates (even though it is addressing a different program altogether).

I installed Perl 5.8.6 on my Fedora Core 3 workstation with no problems.  What gives?
Question by:LucentNugent
    LVL 22

    Expert Comment

    Looking at your errors, I'm going to suggest that what is happening is due to incompatabilities within the perl package you have downloaded, not your architecture, although the fact you are trying to compile this on a 64 bit architecture may be causing it to refer to '64 bit' specific bits of code that might have a problem.

    However, looking at what you are trying to do, my first approach would be to remove the old version of perl before trying to install this one, as it is possible that the incorrect libraries are being referenced. Hopefully ,that will force the correct libraries/header files to be used.

    LVL 51

    Accepted Solution

    beside probably other problems:
      your Makefile does not use the proper

    Author Comment

    I think you're onto it, ahoffman.  I tried running Configure interactively and here is what I discovered.  It asks me which directories to use for my library searches:

    > Directories to use for library searches? [/usr/local/lib /lib /usr/lib]

    I hit ENTER to accept the defaults it suggested.  Then I looked in those three directories.  Here is what is in /lib:

    kbd                                                                                             lsb     modules                 security
    libdevmapper.a            tls

    Sorry for all the files.  But, you'll notice that in here are: and  These are my math libraries, right?

    Then comes this in the interactive prompt:

    Checking for optional libraries...
    No -lsfio.
    No -lsocket.
    No -lbind.
    No -linet.
    No -lnsl.
    No -lnm.
    No -lndbm.
    No -lgdbm.
    No -ldbm.
    No -ldb.
    No -lmalloc.
    No -ldl.
    No -ldld.
    No -lld.
    No -lsun.
    No -lm.
    No -lcrypt.
    No -lsec.
    No -lutil.
    No -lc.
    No -lcposix.
    No -lposix.
    No -lucb.
    No -lBSD.

    In order to compile perl5 on your machine, a number of libraries
    are usually needed.  Include any other special libraries here as well.
    Say "none" for none.  The default list is almost always right.

    It looks like it's not finding any libraries.  Could that be because it's looking for and doesn't recognize or as the right file?  I don't know much about compiling/linking in C.



    Author Comment

    Excuse me, is actually just a link to

    Author Comment

    Okay, here's what I did.  I went to /lib and created a soft link: ->

    This made it work and I now have both 5.8.5 and 5.8.6 (the new version) working.  Thanks!

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now