hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <qwertyman...@gmail.com>
Subject Re: Hadoop 0.20.2 with eclipse in windows
Date Tue, 14 Dec 2010 16:58:31 GMT

On Tue, Dec 14, 2010 at 9:54 AM, Matthew John
<tmatthewjohn1988@gmail.com> wrote:
> I tried installing using this link, but as in the tutorial when I try to run
> bin/hadoop namenode -format
> it gives the following error :
> bin/hadoop: line 2 : $'\r' : command not found
> and many such statements..

This is because you probably edited the hadoop related files (conf or
scripts) with a Windows-specific editor, like Notepad/Wordpad (which
adds /n/r newlines instead of /n which is accepted in UNIX-like
environments -- some editors do worse, but hopefully that's not the
case yet).

Open all edited files with Vim, set the newline mode to UNIX and save
it. This error should go away then. (Or any other editor/command that
changes the newline format of a file -- a linux coreutil called
dos2unix does this for you, if installed in cygwin)

Harsh J

View raw message