LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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
  Search this Thread
Old 11-30-2009, 07:51 AM   #1
Fierce
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Rep: Reputation: 0
Question need help


hello i'm a real newbie to linux stuff and i have bought VPs with Ubuntu 9.04 OS and i'm trying to run my moparscape server but when i tru to run it i get this error
Code:
-bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory
could some one tell me what could be wrong?

heres what's in run.sh
Code:
#!/bin/bash
java -Xmx256m -client -d64 server
P.S. i'm using SSH access
 
Old 11-30-2009, 07:58 AM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 83
try changing this:
Code:
#!/bin/bash
java -Xmx256m -client -d64 server
to this:
Code:
#!/bin/sh
java -Xmx256m -client -d64 server
 
Old 11-30-2009, 07:58 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,661

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
Fierce,

have you installed bash in the server? and where is the script located?
 
Old 11-30-2009, 07:59 AM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 83
have you tested that your java command
Quote:
java -Xmx256m -client -d64 server
works in the terminal?
 
Old 11-30-2009, 08:05 AM   #5
Fierce
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Original Poster
Rep: Reputation: 0
ok it says that java command is not found but i have java installed how to fix this? and the sh file is in /joomla/ folder

Last edited by Fierce; 11-30-2009 at 08:06 AM.
 
Old 11-30-2009, 08:45 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Code:
-bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory

Note the "^M" above. That indicates that your script was edited in windows. You may need to run the "dos2unix" utility to convert the line endings in your script.
 
Old 11-30-2009, 08:51 AM   #7
Fierce
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Original Poster
Rep: Reputation: 0
ok i reinstalled OS to debain now and i get diferent error
Code:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
 
Old 11-30-2009, 10:02 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

Rep: Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284
.

sudo apt-get install sun-java6-jdk

provides genuine and versatile java 6-15-1.

You will need it. .. .. .. ..
.....
 
Old 11-30-2009, 10:05 AM   #9
jkzfixme
Member
 
Registered: Sep 2006
Location: Orange County, NY
Distribution: Ubuntu, Solaris, Android
Posts: 329
Blog Entries: 21

Rep: Reputation: 52
you are probably allocating to little memory, try this

Quote:
javac -J-Xmx512m
Regards,
JKZfixme
 
Old 11-30-2009, 10:20 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,073

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by Fierce View Post
ok it says that java command is not found but i have java installed how to fix this? and the sh file is in /joomla/ folder
No, it doesn't say that. The error is pretty evident if you stop a second and read it, it's telling you it can't find the shell interpreter because of the line ending character.

Look at jschiwal's response which is the right one.
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 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