LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 08: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, 08: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: 88
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, 08:58 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Fierce,

have you installed bash in the server? and where is the script located?
 
Old 11-30-2009, 08: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: 88
have you tested that your java command
Quote:
java -Xmx256m -client -d64 server
works in the terminal?
 
Old 11-30-2009, 09: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 09:06 AM.
 
Old 11-30-2009, 09:45 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 09: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, 11:02 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
.

sudo apt-get install sun-java6-jdk

provides genuine and versatile java 6-15-1.

You will need it. .. .. .. ..
.....
 
Old 11-30-2009, 11: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, 11:20 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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 08:30 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
Open Source Consulting | Domain Registration