我已经下载了猪,但它不工作

I have downloaded pig but it is not working

我已经安装了Pig。但是当我用 运行 命令检查 pig 版本时。它说的是无效选项。我已经编辑了 bashrc 文件。

执行 source .bashrc 后出现以下错误:

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

添加到 .bashrc 文件的 export 语句不应在 =

周围包含空格

编辑 ~/.bashrc,因为 $PATH 变量未设置,所以对可执行文件使用绝对路径。

/usr/bin/vi ~/.bashrc

Pig 的这些行(取自评论)添加到 bashrc 文件,

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