LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2010, 10:06 PM   #1
Techno Guy
Member
 
Registered: Dec 2008
Posts: 62

Rep: Reputation: 15
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

Last edited by Techno Guy; 01-22-2010 at 10:48 PM.
 
Old 01-23-2010, 05:05 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 01-23-2010, 07:26 PM   #3
Techno Guy
Member
 
Registered: Dec 2008
Posts: 62

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libpcre invalid ELF header error. geoffd4 Linux - Software 2 01-18-2022 05:12 PM
Invalid ELF header? Am I screwed? MythN00b Linux - Software 2 01-25-2008 05:52 AM
Transcode invalid ELF header DragonM15 Linux - Software 8 05-13-2007 10:09 PM
Wine: Invalid ELF Header stevesk Linux - Software 1 07-17-2006 09:50 PM
"invalid Elf header" after kernel upgrade Goo Slackware 7 10-09-2004 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration