我收到了这个错误。
-bash: .bashrc: line 122: syntax error: unexpected end of file
你能看看我的bashrc
吗?cat -An ~/.bashrc | tail -3
119 export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native$
120 export PATH=$PATH:$HADOOP_HOME/sbin$
121 export PATH=$HADOOP_HOME/bin$
由于
答案 0 :(得分:0)
我猜你没有正确设置,请按照:
vi $ HOME / .bashrc 将以下行放在文件的末尾:(将hadoop改为你的家)
# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/local/hadoop
# Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on)
export JAVA_HOME=/usr/lib/jvm/java-6-sun
# Some convenient aliases and functions for running Hadoop-related commands
unalias fs &> /dev/null
alias fs="hadoop fs"
unalias hls &> /dev/null
alias hls="fs -ls"
# If you have LZO compression enabled in your Hadoop cluster and
# compress job outputs with LZOP (not covered in this tutorial):
# Conveniently inspect an LZOP compressed file from the command
# line; run via:
#
# $ lzohead /hdfs/path/to/lzop/compressed/file.lzo
#
# Requires installed 'lzop' command.
lzohead () {
hadoop fs -cat $1 | lzop -dc | head -1000 | less
}
# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin