天天看点

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

文章目录

  • 1. 错误描述
  • 2. 解决步骤
    • 2.1 下载对应版本的 hadoop 文件并解压配置。
    • 2.2 `copy` 文件到 `Sysytem32` 下
    • 2.3 配置 hadoop 环境变量
    • 2.4 测试

1. 错误描述

刚配置完 windows 的 pySpark 开发环境,

cmd

执行

pyspark

报这个错误,貌似不影响使用,但是看着是真的难受。

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

2. 解决步骤

2.1 下载对应版本的 hadoop 文件并解压配置。

下载所安装的 Spark 版本对应的 Hadoop 版本的压缩包,找个目录进行解压。

比如我当时解压安装的是

spark-2.3.1-bin-hadoop2.6.tgz

,那么我就要下载 hadoop2.6.x 的版本。

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

2.2

copy

文件到

Sysytem32

xx\xx\hadoop-2.6.5\bin

下的

hadoop.dll

文件和

winutils.exe

文件拷贝到

C:\Windows\System32

下面各一份(若有文件重复,忽略此步骤)

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

2.3 配置 hadoop 环境变量

(1)新建系统环境变量

HADOOP_HOME

,值为刚刚解压的 hadoop 所在目录。

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

(2)修改 path 变量:添加一项配置

%HADOOP_HOME%\bin

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

(3)测试 hadoop 环境变量配置成功没有。

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤

出现版本信息即可。

2.4 测试

这个时候再来试一下,发现不报错了。

ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...1. 错误描述2. 解决步骤