ERROR Shell:396 - Failed to locate the winutils binary in the hadoop binary path java.io.IOE...
winutils
Windows binaries for Hadoop versions (built from the git commit ID used for the ASF relase)
项目地址:https://gitcode.com/gh_mirrors/wi/winutils
·
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. 错误描述
刚配置完 windows 的 pySpark 开发环境,cmd 执行 pyspark报这个错误,貌似不影响使用,但是看着是真的难受。
2. 解决步骤
2.1 下载对应版本的 hadoop 文件并解压配置。
下载所安装的 Spark 版本对应的 Hadoop 版本的压缩包,找个目录进行解压。
比如我当时解压安装的是 spark-2.3.1-bin-hadoop2.6.tgz,那么我就要下载 hadoop2.6.x 的版本。

2.2 copy 文件到 Sysytem32 下
将 xx\xx\hadoop-2.6.5\bin 下的 hadoop.dll 文件和 winutils.exe 文件拷贝到 C:\Windows\System32 下面各一份(若有文件重复,忽略此步骤)

2.3 配置 hadoop 环境变量
(1)新建系统环境变量 HADOOP_HOME ,值为刚刚解压的 hadoop 所在目录。
(2)修改 path 变量:添加一项配置 %HADOOP_HOME%\bin

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

出现版本信息即可。
2.4 测试
这个时候再来试一下,发现不报错了。

Windows binaries for Hadoop versions (built from the git commit ID used for the ASF relase)
最近提交(Master分支:4 个月前 )
e8089ecf - 3 年前
d4f71517
point people at cdarlint/winutils for binaries and call out the fact that we could remove the need for this entirely just to run spark on windows 6 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)