-   Linux - Newbie (
-   -   I get "invalid ELF header” when trying to start a perl script in irssi (

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/ invalid ELF header

The script code:

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

%IRSSI = (
      authors=> 'anonymous',
      name=> 'testScript',
      description=> 'testScriptt',
      license=> 'GPL',

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

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 ./ 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:

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


Techno Guy 01-23-2010 07:26 PM

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

tar -xvf glib-2.23.1.tar.gz
cd glib-2.23.1
checkinstall (same as doing make install)

tar -xvf irssi-0.8.14.tar.gz
cd irssi-0.8.14

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.