简体   繁体   中英

running hadoop on Windows-7 64 bit

I am running hadoop on windows-7 64 bit and getting this error:

Exception in thread "main" java.io.IOException: Cannot run program "chmod": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:149)
    at org.apache.hadoop.util.Shell.run(Shell.java:134)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:286)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:354)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:337)
    at org.apache.hadoop.fs.RawLocalFileSystem.execCommand(RawLocalFileSystem.java:481)
    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:473)
    at org.apache.hadoop.fs.FilterFileSystem.setPermission(FilterFileSystem.java:280)
    at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:266)
    at org.apache.hadoop.mapred.JobClient.configureCommandLineOptions(JobClient.java:573)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:761)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)
    at finanalytics.ClassifyMR$MapClass.main(ClassifyMR.java:172)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:188)
    at java.lang.ProcessImpl.start(ProcessImpl.java:132)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
    ... 14 more

Solution of this problem is given here http://javaprotlib.sourceforge.net/packages/io/howtofixhadoop.html . I installed latest version of cygwin but I don't know how to set environment variable because I can find cygwin-chmod any where in cygwin installed directory as mentioned on that page. How do I set this variable and what are the other configuration to run the program.

Set the System Path Variable to the location of chmod.exe If you have installed cygwin64 using windows installer then your chmod.exe should exist under

INSTALLATION_DIR\cygwin64\bin

For me, I have installed cygwin in my C drive, so the value of my System Path Variable is ;C:\\cygwin64\\bin

can you please try using bellow

Fixing Dependence Bug The solution is to install cygwin in your windows system or install a subset of it as only chmod and its dlls are needed. We will provide, in the following, a solution for the second alternative:

First Step: Get "chmod" Resources Here are the archives for different Windows architectures:

Windows 32-bit - contains chmod.exe, cygwin1.dll, cygiconv-2.dll, cygintl-8.dll and cyggcc_s-1.dll Windows 64-bit - not yet available Second Step: Set your Path in Windows Do not forget to set your PATH variable for chmod in Windows else chmod will not be found!!

First right-click on your My Computer icon on your Desktop and click on Properties. Alternatively you could just press the Windows Key+Pause Break Key Then in the new window that opened, click on the Advanced tab Click on Environment Variables In System Variables, edit or create the PATH variable and enter the path name to cygwin-chmod directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM