Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2004, 05:42 PM   #1
LQ Newbie
Registered: Jan 2004
Posts: 16

Rep: Reputation: 0
Why cant i execute a perl script

When I try to execte my script I get following error:

[root@ scripts]# su cactiuser perl localhost
perl: /usr/bin/perl: cannot execute binary file

I also tried

[root@ scripts]# su cactiuser localhost /bin/bash=/bin/bash: No such file or directory =/usr/bin/lynx: No such file or directory =/usr/bin/head: No such file or directory my: command not found chomp: command not found line 34: syntax error near unexpected token `{' line 34: `if ($hostname eq '') {'
Old 03-02-2004, 06:31 PM   #2
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
In order to narrow the possible sources for this error, it might be a good idea to check the system log file, to see if there is a more detailed error message.

In a Debian system this file is located at /var/log/messages

Shortly after reproducing the error, display the newest lines in this usually very long file by typing:

tail /var/log/messages
(You need be root to have access to that file).
Old 03-02-2004, 06:50 PM   #3
LQ Newbie
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
try su - cactiuser perl localhost

su by itself does not set environment variables needed by this script. call it with su - (the minus runs the environment scripts and sets the variables)..


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache 2 does not execute Perl! mesh2005 Linux - Networking 1 10-26-2005 11:51 PM
Cannot execute a script grueugene Programming 15 01-27-2005 05:50 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 11:22 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 07:25 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 06:03 AM > Forums > Linux Forums > Linux - Newbie

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

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