Warning: file_put_contents(/datas/wwwroot/jiajiahui/core/caches/caches_template/2/default/show.php): failed to open stream: Permission denied in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 55

Warning: chmod(): Operation not permitted in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 56
java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries. - 源码之家

java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries.

windows下运行hadoop的程序报错java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

这是因为windows环境变量不兼容的原因

java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries.


解决办法:

下载winutils地址https://github.com/srccodes/hadoop-common-2.2.0-bin下载解压

配置环境变量
增加用户变量HADOOP_HOME,值是下载的zip包解压的目录,然后在系统变量path里增加%HADOOP_HOME%\bin 即可。  

java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries.

java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries.


再次运行程序,即可正常执行。

java.io.IOException: Could not locate executable ...\bin\winutils.exe in the Hadoop binaries.