DWQA QuestionsCategory: ServerWhen starting Hadoop, prompt master: / usr / bin / env: bash: there is no file or directory
jiawen asked 2 months ago

CentOS version 7.2.1511 prompts when starting Hadoop 2.8.5:

[[email protected] sbin]# ./start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [master]
Master: / usr / bin / env: bash: there is no such file or directory
Master: / usr / bin / env: bash: there is no such file or directory
Slave1: / usr / bin / env: bash: there is no file or directory
Slave2: / usr / bin / env: bash: there is no file or directory
Starting secondary namenodes [master]
Master: / usr / bin / env: bash: there is no such file or directory
starting yarn daemons
resourcemanager running as process 11195. Stop it first.
Master: / usr / bin / env: bash: there is no such file or directory
Slave1: / usr / bin / env: bash: there is no file or directory
Slave2: / usr / bin / env: bash: there is no file or directory

In fact, it can be found in the system/usr/bin/envI don’t know what caused this directory. It’s been debugged for a day and hasn’t been finished yet. Please take a look. Thank you!
The installation steps refer to:https://blog.csdn.net/source_…,/usr/bin/envIt should not be a directory, but a file

$ file /usr/bin/env
/usr/bin/env: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=92a80275c7d29d451b8d1971f02f7f59d971d160, stripped
zuch replied 2 months ago

Sorry, I don’t know Hadoop, I don’t know its running environment andstart-all.shThe content of the script, so I can’t help you. But I see the first line of your running result prompt you that the script has been abandoned and needs to be usedstart-dfs.shandstart-yarn.sh

zuch replied 2 months ago

Thank you. Run alonestart-dfs.shIt also indicates that there is no file or directory

1 Answers
Yujiaao answered 2 months ago

/usr/bin/envIt should not be a directory, but a file

$ file /usr/bin/env
/usr/bin/env: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=92a80275c7d29d451b8d1971f02f7f59d971d160, stripped
jiawen replied 2 months ago

`[[email protected] bin]# file /usr/bin/env/usr/bin/env: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=ff7fe1beec0c1a62eb6cc0f8283eb7e36e674106, stripped`