I am trying to install Hadoop in ubuntu after setting these lines in the .bashrc of Hadoop installation
export HADOOP_HOME="/Desktop/hadoop-1.2.1"
set PATH ="$PATH:$HADOOP_HOME/bin"
export PATH
I wrote in the terminal
hadoop version
I got:
hadoop: command not found
The line:
set PATH ="$PATH:$HADOOP_HOME/bin"
is not what you think it means in bash
. In Bash set
is used for many things, but not for assigning variables. That line actually sets the command-line arguments ( unnamed parameters ) accessed as $1
and $2
.
You probably mean:
export HADOOP_HOME="/Desktop/hadoop-1.2.1"
export PATH="$PATH:$HADOOP_HOME/bin"
Note that spaces are not allowed around the =
.
Make sure you then "source" the .bashrc
file before testing.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.