LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 04-27-2004, 07:24 AM   #1
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Rep: Reputation: 0
/bin/csh: bad interpreter


Hello
i'm working with a program(a network simulator) on a machine that has winlinux installed with kde. The machine is not mine,and the installation was already made when i started working.
When i'm trying to run a simulator script i'm getting "/bin/csh: bad interpreter: No such file or directory".

I understand that this error message doesnt have to do with this particular software,but something critical is missing from the system.I've searched at the package manager but i didnt find any related packages.

can you help me?
 
Old 04-27-2004, 10:24 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
That's a common error when you try to run a script which requires an interpreter or shell that doesn't exist. If you open the file you will probably see that the first line is something like this:
Code:
#!/bin/csh
This line tells the system that this is a cshell script, or more exactly - the program that the script should be interpreted with is /bin/csh. The most common shells on Linux are bash (/bin/bash) and the Bourne shell (/bin/sh). Other interpreters include perl and python, but those are not regular user shells but rather dedicated programming languages.

In order to get it working you need to install csh.


Håkan
 
Old 04-27-2004, 12:09 PM   #3
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Original Poster
Rep: Reputation: 0
thx a lot hw-tph
can you tell me how shall i install it?i told you that i searched at the available packages and could it find it.
where can i download it?
if i change the code to #!/bin/bash will it work?
 
Old 04-27-2004, 04:45 PM   #4
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Original Poster
Rep: Reputation: 0
come on,i know that experienced users can answer this,it isn't that complex.
help me plz
 
Old 04-27-2004, 07:07 PM   #5
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
yes change it to a shell thats available on the system.

#!/bin/sh works almost anytime.
But then you will need to change the script to use sh's commands not the C shells commands.
Also, you can find the package if you look.
On a Redhat Sytem its something like,

[jasper@lanhost jasper]$ rpm -qa |grep csh
tcsh-6.12-4 <------------------------------Thats the package.
[jasper@lanhost jasper]$
 
Old 04-28-2004, 04:34 AM   #6
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
I think most distributions come with csh (but perhaps not installed by default) so look around on your CD's, your distribution's FTP server or use rpmfind.net if you use Redhat/Mandrake.


Håkan
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 08:25 AM
/bin/sh: bad interpreter: Permission denied itsaso Linux - Newbie 6 05-18-2005 10:00 AM
Selinux, ./INSTALL: /bin/sh: bad interpreter: Permission denied TomF Linux - Security 2 12-08-2004 11:36 AM
/bin/sh: bad interpreter: Permission denied linmix Linux - Software 12 08-16-2004 06:40 AM
/bin/sh: bad interpreter mullog Linux From Scratch 1 06-09-2004 02:30 PM


All times are GMT -5. The time now is 08:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration