gpt4 book ai didi

hadoop - 有人知道如何修复 hadoop-functions.sh "syntax error near unexpected token ` <'"吗?

转载 作者:可可西里 更新时间:2023-11-01 15:46:00 25 4
gpt4 key购买 nike

我在运行 OSX 10.14.2 的 MacPro 上配置了 Hadoop 3.1.1,当我运行 start-all.sh 时出现以下错误

$ sudo /usr/local/Cellar/hadoop/3.1.1/sbin/start-all.sh
Starting namenodes on [localhost]
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: syntax error near unexpected token `<'
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: ` done < <(for text in "${input[@]}"; do'
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 70: hadoop_deprecate_envvar: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 87: hadoop_bootstrap: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 104: hadoop_parse_args: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 105: shift: : numeric argument required
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 244: hadoop_need_reexec: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 252: hadoop_verify_user_perm: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 213: hadoop_validate_classname: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 214: hadoop_exit_with_usage: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 263: hadoop_add_client_opts: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 270: hadoop_subcommand_opts: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 273: hadoop_generic_java_subcmd_handler: command not found

启动数据节点、辅助名称节点、资源管理器和节点管理器的问题相同。

我在网上找到了类似的错误引用:https://issues.apache.org/jira/browse/HDFS-12571 .

更新经过一些调试,根本原因是 bash "<<(command)"语法由于某种原因未被接受。系统上的 bash 版本(来自 Homebrew 的/bin/bash 和/usr/local/bin/bash)都可以正常工作。

最佳答案

也许你应该修改hadoop-env.sh中的HDFS_NAMENODE_USERHDFS_DATANODE_USER等为current user而不是root !然后在运行 sudo ./start-all.sh 命令之前,您可能需要使用 hdfs namenode -format 重新创建 hdfs namenode。

关于hadoop - 有人知道如何修复 hadoop-functions.sh "syntax error near unexpected token ` <'"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54696265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com