■ localhost: Error: JAVA_HOME is not set and could not be found.
~/.bash_profile에 JAVA_HOME 환경변수가 설정되어 있음에도 hadoop shell 명령어(ex. start-yarn.sh)를 실행할 때 위의 에러 메세지가 발생한다면 ~/.bashrc에 아래와 같이 JAVA_HOME환경변수를 등록하고 hadoop shell 명령어를 실행해 보자. 물론 /usr/local/java 디렉토리는 JDK가 설치된 디렉토리이어야 한다.
[nextman@centos01 ~]$ vi ~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= export JAVA_HOME=/usr/local/java # User specific aliases and functions [nextman@centos01 ~]$ source ~/.bashrc
- hadoop fs 명령어 정리 2016년 3월 9일
- Eclipse Hadoop WordCount 2016년 3월 1일
- Missing artifact jdk.tools:jdk.tools.:jar:1.x 2016년 3월 1일
- localhost: Error: JAVA_HOME is not set and could not be found. 2016년 2월 28일
- Hadoop 완전분산 설치 2016년 2월 28일
- hadoop standalone mode install – 하둡 단일모드 설치 2014년 9월 13일