Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

328
Views
Could not find or load main class org.apache.hadoop.util.VersionInfo

I followed "http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html" to install hadoop on ubuntu. But, upon checking the hadoop version I get the following error:

Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

Also, when I try: hdfs namenode -format

I get the following error:

Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode

The java version used is:

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

It is a problem of environmental variables setup. Apparently, I didnt find one which can work until NOW. I was trying on 2.6.4. Here is what we should do

export HADOOP_HOME=/home/centos/HADOOP/hadoop-2.6.4
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export HADOOP_CONF_DIR=$HADOOP_HOME
export HADOOP_PREFIX=$HADOOP_HOME
export HADOOP_LIBEXEC_DIR=$HADOOP_HOME/libexec
export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH
export HADOOP_CONF_DIR=$HADOOP_PREFIX/etc/hadoop

Add these into your .bashrc and dont forget to do

source ~/.bashrc

I think your problem will be solved as was mine.

over 4 years ago · Santiago Trujillo Report

0

You probably did not follow the instructions correctly. Here are some things to try and help us / you diagnose this:

  • In the shell that you ran hadoop version, run export and show us the list of relevant environment variables.

  • Show us what you put in the /usr/local/hadoop/etc/hadoop/hadoop-env.sh file.

  • If neither of the above gives you / us any clues, then find and use a text editor to (temporarily) modify the hadoop wrapper shell script. Add the line "set -xv" somewhere near the beginning. Then run hadoop version, and show us what it produces.

over 4 years ago · Santiago Trujillo Report

0

Adding this line to ~/.bash_profile worked for me.

export HADOOP_PREFIX=/<where ever you install hadoop>/hadoop

So just:

  1. $ sudo open ~/.bash_profile then add the aforesaid line
  2. $ source ~/.bash_profile

Hope this helps (:

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!