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

Hi,

I am on a Linux-system with an old 5.8.8 Perl where I am not root and cannot get to the internet from.

What I want is readline-support for the debugger for me, so I tried to install Term::ReadLine and Term::ReadKey locally to a subdir of my home via tarballs running "perl Makefile.PL PREFIX=...; make; make install".

The installation did not give me any errors, but Term::Readkey does not work:

perl -MTerm::ReadKey -e 1 Can't load '/home/whatever/PM/lib/site_perl/5.8.8/i686-linux-thread-mu +lti/auto/Term/ReadKey/ReadKey.so' for module Term::ReadKey: /home/wha +tever/PM/lib/site_perl/5.8.8/i686-linux-thread-multi/auto/Term/ReadKe +y/ReadKey.so: wrong ELF class: ELFCLASS64 at /sysmgmt/perl/lib/perl5/ +5.8.8/i686-linux-thread-multi/DynaLoader.pm line 230. at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted. >
I have not seen this before - can someone tell what the problem is here?

Many thanks!

Replies are listed 'Best First'.
Re: wrong ELF class
by aitap (Curate) on Jul 19, 2012 at 16:52 UTC
    It seems that ether your compiler setup or your Perl setup is wrong: ReadKey.so is compiled for 64-bit system while perl binary is 32-bit.
    Sorry if my advice was wrong.
      But how can that happen?

      Should not MakeMaker ensure that you either can't compile or compile suitably?

        Grashoppah, there is no should, only do...

        Now back to your studies: wax on... wax off... wax on... wax off...
        You could have 64-bit system installed and 32-bit Perl installed from somewhere else. Does running linux32 before compiling help you to build the 32-bit module?
        Sorry if my advice was wrong.
Re: wrong ELF class
by zentara (Cardinal) on Jul 19, 2012 at 17:16 UTC
    Thats a pretty descriptive warning. On 64 bit linux, when I try to execute a 32 bit executable, I get a very terse message: No such file.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh