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


Closed Thread
  Search this Thread
Old 12-12-2011, 05:36 PM   #1
colindek
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Rep: Reputation: Disabled
Post /usr/bin/perl^M: bad interpreter: No such file or directory


Hi,

I have installed Ubuntu 11.10 Latest Version 32-bit and I have a problem after I have installed Perl.

I got this error: /usr/bin/perl^M: bad interpreter: No such file or directory

what I need to to for fix this error?

I've installed apt-get install perl and lib
all this commands i used:
perl -MCPAN -e 'install Parallel::ForkManager'
perl -MCPAN -e 'install Authen::SASL'
perl -MCPAN -e 'install Net::SMTP'
perl -MCPAN -e 'MIME::Base64'

Now I don't know what to do I try to remove and re-install again apt-get update after all and without success.

Please help me step by step what to do.

I will appreciate your effort.

Thanks
Colin
 
Old 12-12-2011, 05:49 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Ok, let's sort this out.

1) First of all, you are getting that error in response to what? What are you trying to do when the error comes up?

2) what do you mean by 'after I've installed Perl'? - Perl comes with even the most minimal install of Ubuntu.

3) do:

Quote:
which perl
 
Old 12-12-2011, 06:03 PM   #3
colindek
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have see this error when I trying to ping my network ip is scanning ip 192.168.0.100 and packages and after that is stopped and appear this error. i have apt-get remove perl and re-install again apt-get install perl and again this problem. I try to apt-get update and without success.

do you have a skype, yahoo ,messenger MSN for talk ? I can install Team View and enter in my pc for see exactly the problem.
 
Old 12-12-2011, 06:07 PM   #4
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 548

Rep: Reputation: 116Reputation: 116
The fact you have ^M after the error message points to the file being in dos format. I dunno what progs exist on ubuntu which are similar to tounix/todos - try that, if not, try dos2unix.
 
1 members found this post helpful.
Old 12-12-2011, 06:10 PM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
error: /usr/bin/perl^M: bad interpreter: No such file or directory
1. You are running a script
2. The script begins with (#!/usr/bin/perl)
3. The script was written/saved in Windows

Windows and Linux do not use the same line endings. You need to convert a windows text file to use linux line endings by running:
Code:
dos2unix name_of_script
At the risk of being overly obvious: replace "name_of_script" with the path and filename for the script you are trying to run.

EDIT:
devnull10 beat me to it!

See: /usr/bin/perl^M: bad interpreter

EDIT2:
Or alternatively, Google results for searching 'perl^M bad interpreter'

Last edited by Dark_Helmet; 12-12-2011 at 06:14 PM.
 
1 members found this post helpful.
Old 12-12-2011, 06:11 PM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by colindek View Post
I got this error: /usr/bin/perl^M: bad interpreter: No such file or directory
Run
Code:
dos2unix yourfile.pl
on your script.
 
Old 12-12-2011, 06:11 PM   #7
colindek
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have installed dos2unix but I don't know how to use and how ^M. I talk with a person and have explain me this problem cause for writing in windows editor like this.

Have Yahoo Messenger ID ? for talk online and enter with Team View in my pc ?
 
Old 12-12-2011, 06:19 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed (or merged) as it is a duplicate of http://www.linuxquestions.org/questi...ectory-917986/. Please don't.
 
Old 12-12-2011, 06:23 PM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Closed as per above. Responses are practically the same of the other thread.
 
  


Closed Thread


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
/bin/bash^M: bad interpreter: no such file or directory stevesk Slackware 18 03-07-2012 12:58 PM
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 09:25 AM
/usr/bin/perl^M: bad interpreter: No such file or directory colindek Ubuntu 17 12-13-2011 10:32 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 03:59 PM
Perl v5.8.8 on Centos 5.6 @emptyArray: bad interpreter: No such file or directory j.smith1981 Linux - Software 9 06-24-2011 04:25 AM


All times are GMT -5. The time now is 08:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration