running hadoop on Windows-7 64 bit

自古美人都是妖i 提交于 2019-12-23 02:52:14

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/17388849/running-hadoop-on-windows-7-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!