Search code examples
apache-pig

I have downloaded pig but it is not working


I have installed Pig. But when I am running command to check pig version. It is saying invalid option. I have edited bashrc file.

After doing source .bashrc I am getting following error:

hduser@ubuntu:~$ source .bashrc
bash: export: '=': not a valid identifier
bash: export: '/usr/local/pig': not a valid identifier
bash: export: '=': not a valid identifier
bash: export: 'PATH:/usr/local/pig/bin': not a valid identifier
bash: export: '=': not a valid identifier
bash: export: '/usr/local/hadoop/conf': not a valid identifier

Solution

  • The export statements added to the .bashrc file should not contain whitespaces around =

    Edit ~/.bashrc, since the $PATH variable is unset, use absolute paths for the executables.

    /usr/bin/vi ~/.bashrc
    

    Add these lines for Pig (taken from the comments) to the bashrc file,

    export PIG_HOME=/usr/local/pig-0.15.0
    export PATH=$PIG_HOME/bin:$PATH