Hadoop报错:Failed to locate the winutils binary in the hadoop binary path

Could not locate executable null\bin\winutils.exe in the Hadoop binaries

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

原因:window本地无法获取hadoop的配置

解决方法:

1、http://archive.apache.org/dist/hadoop/core/hadoop-2.5.1/   将以下压缩包下载到本地并解压

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第1张

2、下载https://github.com/srccodes/hadoop-common-2.2.0-bin到本地并解压

3、将D:\hadoop-common-2.2.0-bin-master\bin下的所有文件copy到 D:\hadoop-2.5.1\bin下

4、配置环境变量:

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第2张

 

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第3张

 

 问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第4张

 

5、在命令行运行 hadoop version

如果此时出现以下错误:The system cannot find the batch label specified - make_command_arguments

解决办法:

(1)call 要顶行写,不能有空格

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第5张

 (2) :make_command_arguments (命令参数标签)需要放在cmd脚本的最后面

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第6张

问题解决:

问题解决:Could not locate executable nullinwinutils.exe in the Hadoop binaries 随笔 第7张

 

最后,去IDEA中重新运行以下程序,如果还是报同样的错误,先去命令行输入:echo %path%,如果修改的环境变量已经更新,则重新idea即可,如果没有更新,重启计算机。

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄