Can't install Perl on Redhat

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?
Who is Participating?
beside probably other problems:
  your Makefile does not use the proper
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.

LucentNugentAuthor Commented:
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.


LucentNugentAuthor Commented:
Excuse me, is actually just a link to
LucentNugentAuthor Commented:
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.