MapReduce 未运行。 /bin/bash: /bin/java: 没有这样的文件或目录
我收到以下错误。
[2022-03-01 20:03:49.581]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory
我已经在 hadoop-env.sh 中设置了 JAVA_HOME。我在 MacOS 12.1 上运行,因此无法使用符号链接。
hadoop-env.sh配置:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home
重新安装Hadoop两次。
任何意见都会受到赞赏。
Hadoop版本:3.3.1(hadoop-config.sh即可)
I am getting the following error.
[2022-03-01 20:03:49.581]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory
I have set up my JAVA_HOME in the hadoop-env.sh. I am running on MacOS 12.1 so symlink is not possible.
hadoop-env.sh configuration:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home
Reinstalled Hadoop twice.
Any input is appreciated.
Hadoop version: 3.3.1 (hadoop-config.sh is fine)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经卸载了Hadoop的brew安装,直接从apache网站安装。现在正在工作。
有趣的是,我发现 sbin 文件夹中的所有脚本都有 JAVA_HOME 预定义的不同路径“/opt/hombrew/opt”,而不是我的 Java(我从网络安装而不是自制程序)所在的路径。我猜想 Hadoop 的自制版本将所有 Java 版本预设为已安装的 java 的软链接所在的位置。
我再次安装了hadoop的自制版本,我可以看到当前正在推送3.3.2。
start-all.sh 脚本如下:
从 Apache 网站下载的 Hadoop 的文件夹分布与从 Homebrew 下载的 Hadoop 的文件夹分布有点不同。
I have uninstalled the brew installation of Hadoop and installed it directly from the apache website. It is working now.
Interestingly I found all the scripts in sbin folder have JAVA_HOME predefined different path '/opt/hombrew/opt' than what my Java (I installed from the web instead of homebrew) is at. I guess homebrew version of Hadoop presets all the Java versions to where a softlink of the java installed is present.
I have again installed homebrew variant of hadoop, I can see that 3.3.2 is being pushed currently.
The start-all.sh script is as such:
The folder distribution of Hadoop downloaded from the Apache website and from Homebrew is a bit different.