Support Questions

Find answers, ask questions, and share your expertise

-bash: hadoop: command not found

avatar
New Contributor

Hi

I've just installed the sandbox. This is what I get when I try to run any hadoop command.

[root@hdp001 local]# hadoop dfsadmin -bash: hadoop: command not found

Am I missing something (I was under the impression that hadoop was already installed in the sandbox).

Thkx

8 REPLIES 8

avatar
Master Mentor

@Ralph Adekoya

By any chance have you edited or modified the PATH variable? Your PATH should include the "/usr/bin" because the "hadoop" and "hdfs" commands are present inside this path.

/usr/bin/hadoop
/usr/bin/hdfs

- Also please double check if bymistake HDFS_CLIENTS / Services are removed?

- My PATH setting (default) is as following:

# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

.

avatar
New Contributor

Thkx for your response

I can't find hadoop or hdfs in the /usr/bin directory. I'm new to hadoop. I'm assuming that hadoop should be part of the sandbox.

Pls advice.

Thkx again

avatar
Contributor

@Ralph Adekoya

Can you try "which hadoop" or "which hdfs" to identify the location of executables.

avatar
Master Mentor

@Ralph Adekoya

As you mentioned earlier "I was under the impression that hadoop was already installed in the sandbox".

>> Yes you are correct, those commands should be by default available with the sandbox.

Can you please let us know if by any chance you deleted some packages from the sandbox (or is then any dir you removed from it).

- If it is fresh sandbox (which you started using recently) then i will suggest you to use a new sandbox instance.

- Also can you please check in your ambari that HDFS/HDFS clients are installed on this host or mistakenly deleted?

.

avatar
Super Guru

Ralph Adekoya

Run

exec bash

and try your hadoop dfsadmin commands.

avatar
New Contributor

I am also facing the same issue in last two days though I followed the same procedure given.

1. command "which hadoop" and "which hdfs" is not giving any result.

2. I am not seeing hadoop or hdfs in the /usr/bin directory

I am new to Hadoop, Your help is much appreciated

avatar
New Contributor

Same issue. Cant find any folders

,

Same issue. Cant find any folders.

avatar
New Contributor

Seems like some changes with the latest build. I am also facing similar issue

,

seems like an issue with the latest installation. I'm also facing the same issue