gpt4 book ai didi

macos - 已收到,未找到 Hadoop 命令

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

我是 Hadoop 的新手,尝试在我的 Mac OS X 上安装,当我在终端中运行命令 hadoop version 时,我收到 hadoop 命令未找到的消息。我在这里搜索了帮助文件,但仍有问题..

下面是我在网上找到的 .bashrc 文件

# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/bin/hadoop

# Set JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin

这是我的 java 位置的 hadoop-env.sh 文件

# The java implementation to use.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home

我的hadoop安装位于/usr/bin/hadoop

最佳答案

$cd ~
$vi .bashrc

paste following to the end of the file

#Hadoop variables
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
export HADOOP_INSTALL=/usr/bin/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
###end of paste

$ cd /usr/bin/hadoop/etc/hadoop
$ vi hadoop-env.sh

#modify JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/

更多细节- http://codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html

关于macos - 已收到,未找到 Hadoop 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32241216/

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