Pig installation issue in cloudera VM

Pig is not running in Cloudera VM. Can some one please help me

I have updated .bashrc file but Pig didn't run.

Tried below process also, but it's not running getting below error.

[cloudera@localhost ~]$ cd
[cloudera@localhost ~]$ export JAVA_HOME=/usr/lib/jvm/java-6-sun-
[cloudera@localhost ~]$ echo $JAVA_HOME
[cloudera@localhost ~]$ pig
/usr/lib/hbase/bin/hbase: line 231: /usr/lib/jvm/java-6-sun- No such file or directory
/usr/lib/hadoop/bin/hadoop: line 139: /usr/lib/jvm/java-6-sun- No such file or directory
/usr/lib/hadoop/bin/hadoop: line 139: exec: /usr/lib/jvm/java-6-sun- cannot execute: No such file or directory
[cloudera@localhost ~]$

3 Answer(s)


Hi Venkata,
Pig are preinstalled in the cloudera vm. If you edited the .bashrc file. Then it might not work because of the directory location you updated.
Please reset the settings and open cloudera manager and check whether services are running. If not then start the services especially oozie. Then use the pig command again. It should work.

Hope that helps.


Looks like your JAVA_HOME is not defined correctly. It should be:



hi Venkata,

Why do you want to install Pig in cloudera when there is Pig availability in the system