Solution:
First, check apache web site to make sure your Hadoop and Pig versions are compatible.
Then, make sure the following two environment variables are set correctly:
export PIG_CLASSPATH=~/hadoop-0.23.4/etc/hadoop
export HADOOP_HOME=~/hadoop-0.23.4