bash: alias: VARIABLES: not found: #HADOOP VARIABLES START


5 Answer(s)


Eva,

i am still yet to install. 

 

Meenakshi


Hi Eva,

Your bashrc file has some issue. While editing the bashrc you made some changes in available text.

Check the last line, before the hadoop variables. Or you can share your bashrc with us.

Hope this helps.

Thanks.


Please see the attached screens from my bashrc

The last line before the hadoop variables is fi

Is there a way to change it to file and edit it again or do I need to delete the VM and start over.



Line number 87 is fi as well.  See attachment.  Thanks.

hadoop@hadoop-virtual-machine:~$ exec bash
Shopt: command not found
bash: alias: VARIABLES: not found
bash: alias: START: not found
bash: /home/hadoop/.bashrc: line 87: syntax error near unexpected token `fi'
bash: /home/hadoop/.bashrc: line 87: `fi'
hadoop@hadoop-virtual-machine:~$

 



I am not sure why you are getting the issue. I couldn't able to find any issues.
 
Please run the following commands to recover the bashrc file:
  1. Backup your current .bashrc file:
    cp ~/.bashrc ~/.bashrc.bak
    
  2. Copy the skeleton .bashrc file over yours:
    cp /etc/skel/.bashrc ~/
    
  3. Afterwards, load the new one:
    source ~/.bashrc
    
 
And then you enter can enter the following hadoop Variables inside bashrc:
 
#HADOOP VARIABLES START
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HADOOP_INSTALL=/usr/local/hadoop
export JAVA_LIBRARY_PATH=$HADOOP_INSTALL/lib/native:$JAVA_LIBRARY_PATH
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
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
export HADOOP_USER_CLASSPATH_FIRST=true
export CLASSPATH=$CLASSPATH:/usr/local/Hadoop/lib/*:.
#HADOOP VARIABLES END
 
Hope this helps.
 
Thanks.