|
|
| Author |
Message |
gregga
Joined: 04 Jun 2003 Posts: 12
|
Posted: Wed Jun 11, 2003 2:14 pm Post subject: /scripts: bad interpreter: No such file or directory |
|
|
several perl scripts in the scripts directory that generate various graphs are giving me the following error when I run them manually:
: bad interpreter: No such file or directory
A specific example is loadavg.pl.
Installed on RH 8.0. Perl & bash are both in /usr/bin, as the script is calling. awk is in the system path under /usr/share as well.
Any ideas?
Thanks! |
|
| Back to top |
|
 |
Becksaward
Joined: 11 Jun 2003 Posts: 13 Location: Germany
|
Posted: Wed Jun 11, 2003 3:22 pm Post subject: |
|
|
look if you got strace installed
then if so do
strace perl scriptname and look
that should give you some more information on where the problem is  |
|
| Back to top |
|
 |
gregga
Joined: 04 Jun 2003 Posts: 12
|
Posted: Wed Jun 11, 2003 4:42 pm Post subject: |
|
|
| Becksaward wrote: |
strace perl scriptname and look
that should give you some more information on where the problem is  |
Thanks. This is what couldn't be found. no idea what it is looking for - this is a stock RH8.0 box with the stock Perl 5. (and NET::SNMP)
#>strace perl loadavg.pl (output trimmed to meaningful items only)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/i686/mmx/libperl.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/i686/mmx", 0xbfffd8e0) = -1 ENOENT (No suc
h file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/i686/libperl.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/i686", 0xbfffd8e0) = -1 ENOENT (No such fi
le or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/mmx/libperl.so", O_RDONLY) = -1 ENOENT (No s
uch file or directory)
stat64("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/mmx", 0xbfffd8e0) = -1 ENOENT (No such fil
e or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libdl.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libm.so.6", O_RDONLY) = -1 ENOENT (No such f
ile or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libpthread.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libc.so.6", O_RDONLY) = -1 ENOENT (No such f
ile or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No su
ch file or directory)
open("/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libutil.so.1", O_RDONLY) = -1 ENOENT (No suc
h file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.1", 0xbfffdff0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/vendor_perl/5.6.1", 0xbfffdff0) = -1 ENOENT (No such file or directory) |
|
| Back to top |
|
 |
Becksaward
Joined: 11 Jun 2003 Posts: 13 Location: Germany
|
Posted: Thu Jun 12, 2003 8:58 am Post subject: |
|
|
strace is the answer !!!
do an
updatedb
then
locate ld.so.preload (or just ld.so)
look if you got everythinfg installed. seems as if you are missing quite a lot files... or, they are readonly (O_RDONLY)
check permissions and if all the files are there.
if the files are there (check permissions) and check if you
got everything installled (like mysql is enabled in php.ini)
and ENOENT seems to mean
NO ENTRY
so possibly missing some files or settings
go step by step and repair everything..then allways do an strace again and look where it stops  |
|
| Back to top |
|
 |
Jevin Sweval
Joined: 10 Jun 2003 Posts: 1 Location: Indiana
|
Posted: Thu Jun 12, 2003 11:44 am Post subject: Re: /scripts: bad interpreter: No such file or directory |
|
|
| gregga wrote: | several perl scripts in the scripts directory that generate various graphs are giving me the following error when I run them manually:
: bad interpreter: No such file or directory
A specific example is loadavg.pl.
Installed on RH 8.0. Perl & bash are both in /usr/bin, as the script is calling. awk is in the system path under /usr/share as well.
Any ideas?
Thanks! | open the scripts in nano or pico or vi or whatever
now go to the space at the end of the 1st line #!/usr/bin/perl_
delete the space(_ in my example)
try it now
i think some editors put crap at the end of the line, i had the same problem |
|
| Back to top |
|
 |
gregga
Joined: 04 Jun 2003 Posts: 12
|
Posted: Thu Jun 12, 2003 1:19 pm Post subject: Re: /scripts: bad interpreter: No such file or directory |
|
|
| Jevin Sweval wrote: | open the scripts in nano or pico or vi or whatever
now go to the space at the end of the 1st line #!/usr/bin/perl_
delete the space(_ in my example)
try it now
i think some editors put crap at the end of the line, i had the same problem |
That was it... there wasn't the extra space after the /usr/bin/perl, but it looks like it was in DOS format. I just saved it out again in vi and all is well now.
Thanks! |
|
| Back to top |
|
 |
|