0

I am trying to find out what version of pig I am using. I thought I already installed it

# yum install hadoop\* mahout\* oozie\* hbase\* hive\* hue\* pig\* zookeeper\*

When I try to enter a pig script, the terminal returns the following.

# pig totalmiles.pig
bash: pig: command not found...
ubliat
  • 1
  • I don't know yum nor pig, but is there a way you can (1) list all installed packages starting with pig, then (2) list the files installed by these packages, and see if the executable is actually called pig? – Sparhawk Apr 09 '19 at 23:18
  • It would be helpful to know which distribution you are using, e.g., Fedora, CentOS, etc. (I'm assuming its one of those given that it uses yum). Also, any output from that command would be helpful to determine if it actually installed correctly. – oxr463 Apr 10 '19 at 00:40

1 Answers1

0

You can check and see what you actually installed with yum install pig* by running yum list pig* as odds are that you didn't install pig but only for instance pigz (a parallel implementation of gzip, that exploits multiple processors and multiple cores when compressing data).

If yum list pig* does show that pig is installed, then it is possible (though unlikely) that the binary is not in your default $PATH. Check for instance with rpm -ql pig where the package installed its contents and the pig executable.

HBruijn
  • 7,418
  • Ok, I checked the following:

    `# yum list pig* Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

    • base: mirror.es.its.nyu.edu
    • epel: mirrors.mit.edu
    • extras: mirror.es.its.nyu.edu
    • updates: mirror.es.its.nyu.edu

    Installed Packages pig-udf-datafu.noarch 1.3.0-1.el7 @bigtop piglit.x86_64 1.0.20170515-4.GITa969d23f.el7 @epel
    pigz.x86_64 2.3.4-1.el7 @epel

    rpm -ql pig

    package pig is not installed`

    – ubliat Apr 11 '19 at 02:17
  • That yum command showed that no package names pig is installed, only pig-udf-datafu and pigz - you need to either add a repository which contains the pig package, download a pre-built rpm for it and stall that etc. – HBruijn Apr 11 '19 at 06:49