LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I get "invalid ELF header” when trying to start a perl script in irssi (https://www.linuxquestions.org/questions/linux-newbie-8/i-get-invalid-elf-header%94-when-trying-to-start-a-perl-script-in-irssi-784133/)

Techno Guy 01-22-2010 10:06 PM

I get "invalid ELF header” when trying to start a perl script in irssi
 
I used to run this script just fine on my old server (Debian 5 Lenny x32)…. but doesn’t seem to work with this new one… though both will have different software installed..

I tell the script to load and I get:
04:55 -!- Irssi: Error loading module testScript/testScript: /user/.irssi/scripts/autorun/testScript.pl: invalid ELF header

The script code:
Code:

#/script load autorun/testScript.pl
use Irssi;
use Irssi::Irc;
#use strict;
use vars qw($VERSION %IRSSI);

$VERSION="0.1";
%IRSSI = (
      authors=> 'anonymous',
      name=> 'testScript',
      description=> 'testScriptt',
      license=> 'GPL',
);

system qq{curl -s -k -b “uid=12345” "http://somesite.com/file.php" > /dev/null 2>&1};
Irssi::print("testScript Loaded");


Running:
Debian 5 (Lenny) amd x64
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
irssi 0.8.14 (20090728 1938)

Perl it’s self seems to work, because i’v run some other Perl scripts directly (perl ./script.pl) and they work fine)

Any ideas as to what is going on here and how I might be able to fix it?
Cheers, Techono

Tinkster 01-23-2010 05:05 PM

Did you copy any of the old stuff (x32) across from the
old install, did you install x64_86 over the top of the
old one? That would be my first suspicion - that there's
some 32 bit code floating around that doesn't want to
work in the current (new) x64_86 environment.

My attempts to finding those executables would go through
your irssi tree and use file to find out what you got
there... something like:
Code:

find /user/.irssi -type f | xargs file | grep -i ELF.*32

Cheers,
Tink

Techno Guy 01-23-2010 07:26 PM

I used the following to install it: (think glib was needed for irssi too…)
Code:

wget http://ftp.gtk.org/pub/glib/2.23/glib-2.23.1.tar.gz
tar -xvf glib-2.23.1.tar.gz
cd glib-2.23.1
./configure
make
checkinstall (same as doing make install)

wget http://www.irssi.org/files/irssi-0.8.14.tar.gz
tar -xvf irssi-0.8.14.tar.gz
cd irssi-0.8.14
ldconfig
./configure
make
checkinstall

I didn’t bring over anything from the old server, only the .pl (perl) scrips and copied over the config file kept in ~/.irssi/ (could the config file of done it… seems unlikely…)

But oh well, turns out I had several other issues, (I compiled most of the stuff I installed, turns out that wasn’t the best idea :P) so i’v reinstalled the server and doing the majority with apt-get this time, irssi seems to be working fine with the scripts now…

But thanks for your help, im sure it will prove useful to someone else one day.


All times are GMT -5. The time now is 12:12 PM.