I just loaded ubuntu for the first time. Well linux period and im having an issue i was wondering if someone could point me in the right path. First off my Makefile was screwed so i figured that out but what i can't figure out is my autorun. I had an issue with !/bin/sh so i installed the SH package and fixed that but every line with a space it says command not found. Then at the end of the warning/error's it says bad end of file…. the only thing at the end of the file is "done" for the completion of the compile. I'm guessing im missing some packages but there is 1000000 packages and im not sure what im looking for or whats wrong. Just trying to learn linux and host my own mud without using cygwin. Thanks alot everyone!
24 Aug, 2009, David Haley wrote in the 2nd comment:
Votes: 0
I'm a little surprised that the 'sh' package wasn't installed already; in fact, I'm actually extremely surprised, as every Linux distribution I've ever seen has always had sh installed from the getgo (including Ubuntu).
Anyhow, you'll need packages like 'make', 'gcc', maybe 'g++'.
Usually it helps to show us exactly what errors you have, in addition to exactly what you have changed with your makefile etc. so that we know what you're working with. For example, it would help if we knew which MUD codebase you were using so that we could know what the makefile looks like.
I'm using Circlemud and the only error i get is "bad end of file". I have GCC and most all basic packages I THOUGHT but my compile is fine since i fixed my Makefile I just can't figure out why autorun is screwy. I'll try this package posted Thanks!
THE Hellion? From Lost Galaxies? The Mighty Feared One?
25 Aug, 2009, David Haley wrote in the 6th comment:
Votes: 0
Small clarification:
Quote
sudo aptitude build-essential autoconf automake
add an 'install' after 'aptitude' and before 'build-essential'
What exactly do you type to get the error, and what exactly did you do to fix your makefile? Is 'autorun' a startup script of some kind? Is it saved in unix or dos format? (Sometimes that can get messed up when you upload across servers.)
bash: ./autorun: /bin/sh^M: bad interpreter: No such file or directory Ok i have SH installed any idea's with this?? And yes autorun is a run script for the mud :D. Thanks again! I'm still trying!!!
looks like !/bin/sh was canceled out i think…… it was like this #!/bin/sh so i removed it and got a couple more errors further down.
'/autorun: line 43: syntax error near unexpected token `do '/autorun: line 43: `while ( : ) do
./autorun: line 88: syntax error: unexpected end of file
Hrmmmm also does the same thing on ./configure. bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
Awww crud yea its in DOS format i just noticed how can i convert? Or do i need too?
26 Aug, 2009, David Haley wrote in the 8th comment:
Votes: 0
Yes, the ^M is indeed an indicator that it's in DOS format.
You need to use dos2unix to convert the file, and possibly many others. Do:
sudo aptitude install tofrodos
You can then run:
dos2unix autorun
which will convert it to a unix file.
Alternatively, open it in vi, and use this command: :set ff=unix and then save it – that should convert it. But changing file format is so often useful that I would recommend the above script anyhow.