Perl - bad interpreter: No such file or directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl - bad interpreter: No such file or directory
# 1  
Old 02-10-2010
Perl - bad interpreter: No such file or directory

Here is a puzzler.

To start, let me say that I've done a search on this issue and it is definitely not related to line endings being encoded in windows returns.

I get this error when I run SOME perl scripts. I have a script called hello_world.pl. I do $cp hello_world.pl new_hello_world.pl and run new_hello_world.pl I get the error but not on the original hello_world.pl.

I've restarted the box to no effect.

If I edit hello_world.pl and make changes... no problem.. runs just fine.

I'm on a Mac with Snow Leopard using macports version of perl but I don't see how that could matter considering I'm copying a working script. Permissions and line endings are, of course, the same.

I did a port update outdated a while ago but I don't think that explains the issue.

Any pointers would be grand.

---------- Post updated at 05:14 PM ---------- Previous update was at 03:37 PM ----------

eh... must have been a screwy perl install I deleted it and reinstalled perl and it seems to work now.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

-bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory

I keep getting this error and I am not sure why. -bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory First I run my makefile and this works fine: goodmain: main.o gcc -o goodmain main.o main.o: main.c gcc -c main.c Then I want to limit my output so I... (11 Replies)
Discussion started by: cokedude
11 Replies

2. UNIX for Advanced & Expert Users

Sqlite3: /lib/ld-Linux.so.2: bad ELF interpreter:

Hi all I'm hoping this is just me being a muppet, has anyone come across this problem before? I am writing an application that uses sqlite3 and I have created a database using it - sqlite3 muse.db SQLite version 3.6.20 Enter ".help" for instructions Enter SQL statements terminated with... (2 Replies)
Discussion started by: steadyonabix
2 Replies

3. Red Hat

Not able to run any command /lib64/ld-Linux-x86-64.so.2: bad ELF interpreter

Hi, I accidentally did this: wadhwaso@nxsdgd01 deps]$sudo rpm -e --nodeps glibc-2.5-107.x86_64 error: %postun(glibc-2.5-107.x86_64) scriptlet failed, exit status 255 and since then I am not able to run any command on this server except 'cd'. I always get the following error: $ ls... (6 Replies)
Discussion started by: stunn3r
6 Replies

4. Shell Programming and Scripting

Bad Interpreter

Hi. My name is Caleb (a.k.a RagingNinja) form the whited00r forums. (Whited00r makes custom firmware for iOS devices). I have been learning and creating simple shells scripts. I have been recently using VIM for Windows or using VirtualBox to run the UBUNTU OS within VirtualBox to create my shell... (2 Replies)
Discussion started by: RagingNinja
2 Replies

5. Shell Programming and Scripting

bad interpreter when running script

Hi All, I'm not confortable in writing script, can someone can help me, when I run that script below i found this error code : -bash: ./script.sh: /bin/sh.: bad interpreter: Here is the script for i in * x=${i##*.} z=$(perl -e 'print time;') t=$(echo $z-$x|bc)... (12 Replies)
Discussion started by: bzb23
12 Replies

6. Shell Programming and Scripting

bad interpreter: Permission denied

Hi I am running a script: #!bin/bash set -x echo"select * from celldatamap;" || sqlcsv -v -h -s ',' -d MTNSA11G -u datasafe -p datasafe > andrea.csv When I run my script ./tablescript.sh I get the following error: $ ./tablescript.sh (3 Replies)
Discussion started by: ladyAnne
3 Replies

7. Shell Programming and Scripting

Executing expect script giving message as bad interpreter: Permission denied

Hi Gurus, I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as #!/usr/bin/expect-5.43 -f spawn telnet localhost 2233 expect "password:" send "secret\r" send "i data.cnbc.com\r" send "exit\r" expect eof When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies

8. Ubuntu

How to resolve bad interpreter error

Hi, Iam trying to run a gmake command and have the latest version of Gnu in my redhat linux system. I need to execute the following steps; ---> chmod +x utils/* ---> ./utils/AllCodeManagerFix ---> gmake LINUX Iam able to do the chmod command but when I run the second command I get... (2 Replies)
Discussion started by: viji19812001
2 Replies

9. UNIX for Dummies Questions & Answers

bad interpreter: Permission denied

I am writing an expect script but am getting a bad interpreter: permission denied error. I don't think the error has anything to do with expect itself, I think I am missing something in how I start the file. For instance, when I run the file under the expect directory it works: cd... (7 Replies)
Discussion started by: earnstaf
7 Replies

10. Shell Programming and Scripting

/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0). Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition. Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS... (4 Replies)
Discussion started by: Calum
4 Replies
Login or Register to Ask a Question
SPEEDY(1p)																SPEEDY(1p)

NAME
speedy - a persistent Perl interpreter SYNOPSIS
speedy [ <perl options> ] [ -- <speedy options> ] [ <filename> ] DESCRIPTION
speedy, short for SpeedyCGI, is a way to run perl scripts persistently, which can make them run much more quickly. The most common way to make a script run persistently is by changing the interpreter line at the top of the script from: #!/usr/bin/perl to #!/usr/bin/speedy After the script is initially run, instead of exiting, the perl interpreter is kept running. During subsequent runs, this interpreter is used to handle new executions instead of starting a new perl interpreter each time. A very fast frontend program, written in C, is exe- cuted for each request. This fast frontend then contacts the persistent Perl process, which is usually already running, to do the work and return the results. Each perl script runs in its own Unix process, so one perl script can't interfere with another. Command line options can also be used to deal with programs that have memory leaks or other problems that might keep them from otherwise running persistently. Although SpeedyCGI is especially useful for CGI scripts, it can be used to keep any perl script running persistently. See CGI::Speedy- CGI(3.pm) for a complete description of SpeedyCGI, including further details on CGI execution and Apache issues. This manual page is based on that, but concentrates on running speedy from the command line. OPTIONS
The speedy command line is the same as for regular perl, with the exception that SpeedyCGI specific options can be passed in after a "--". For example the line: #!/usr/bin/speedy -w -- -t300 at the top of your script will set the perl option `-w' and will pass the `-t' option to SpeedyCGI, setting the Timeout value to 300 sec- onds. The options can also be set at run-time from the perl script using the CGI::SpeedyCGI module. OPTIONS AVAILABLE See CGI::SpeedyCGI(3.pm) for a complete description of the options. -p<string> BackendProg : Path to the speedy backend program. (Default: /usr/bin/speedy_backend) -B<number> BufsizGet : Use <number> bytes as the maximum size for the buffer that receives data from the perl backend. (Default: 131072) -b<number> BufsizPost : Use <number> bytes as the maximum size for the buffer that sends data to the perl backend. (Default: 131072) -g<string> Group : Allow a single perl interpreter to run multiple scripts. See CGI::SpeedyCGI(3.pm) for details. (Default: `none') -M<number> MaxBackends : If non-zero, limits the number of speedy backends running for this perl script to <number>. (Default: 0) -r<number> MaxRuns : Once the perl interpreter has run <number> times, re-exec the backend process. Zero indicates no maximum. This option is useful for processes that tend to consume resources over time. (Default: 500) -t<number> Timeout : If no new requests have been received after <number> seconds, exit the persistent perl interpreter. Zero indicates no timeout. (Default: 3600) -T<string> TmpBase : Use the given prefix for creating temporary files. This must be a filename prefix, not a directory name. (Default: `/tmp/speedy') -v Version : Print the SpeedyCGI version and exit. ENVIRONMENT
Environment variables can also be used to pass in options. This can only be done before the initial execution, not from within the script itself. The name of the environment variable is always SPEEDY_ followed by the option name in upper-case. For example to set the speedy Timeout option, use the environment variable named SPEEDY_TIMEOUT. FILES
/tmp/speedy* A unix socket used to connect to the backend process. See speedy_backend(1) for more information. AUTHOR
Sam Horrocks http://daemoninc.com sam@daemoninc.com NOTES
This manual page was created by Niko Tyni <ntyni@iki.fi> for Debian GNU/Linux, because the original program does not have one. It is based on the original and more complete CGI::SpeedyCGI(3pm) manual page. BUGS
There are command-line parsing incompatibilities with the real Perl. These aren't very easy to fix, as even the perlrun manpage isn't quite accurate on which parameters can be separated (like '-I') and which can't (like '-C'). speedy doesn't allow any of them to be sepa- rated. It considers the first option without a leading dash as the script filename. SEE ALSO
perl(1), CGI::SpeedyCGI(3pm), speedy_backend(1) SPEEDY(1p)