hadoop错误Could not locate Hadoop executable: D:\sorftware\hadoop\hadoop-2.8.0\bin\winutils.exe

在hadoop/bin目录下缺少了winutils.exe和hadoop.dll

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate Hadoop executable: D:\sorftware\hadoop\hadoop-2.8.0\bin\winutils.exe -see https://wiki.apache.org/hadoop/WindowsProblems
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:716)
at org.apache.hadoop.util.Shell.getSetPermissionCommand(Shell.java:251)
at org.apache.hadoop.util.Shell.getSetPermissionCommand(Shell.java:267)
at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:771)
at org.apache.hadoop.fs.RawLocalFileSystem.mkOneDirWithMode(RawLocalFileSystem.java:515)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(RawLocalFileSystem.java:556)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:533)
at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:313)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:133)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:146)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1341)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1338)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1807)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1338)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1359)
at org.test_hadoop.mapreduce.MyWordCountJob.main(MyWordCountJob.java:108)

因此需要两个文件下载拷贝进去;

下载:https://download.csdn.net/download/vtopqx/10519763

下载解压后放到/bin目录即可;

hadoop错误Could not locate Hadoop executable: D:\sorftware\hadoop\hadoop-2.8.0\bin\winutils.exe_第1张图片

测试过,不需要放到C:\Windows\System32目录下,当然需要配置开发工具的IDE,如Eclipse需要配置hadoop,如下:hadoop错误Could not locate Hadoop executable: D:\sorftware\hadoop\hadoop-2.8.0\bin\winutils.exe_第2张图片


启动,即可正常运行hadoop!


 


你可能感兴趣的:(Hadoop研究,hadoop错误,no,found,winutils.exe,winutils.exe下载)