我在 ubuntu 中将HADOOP作为单个节点使用,java home 设置为 java-8-openjdk-amd64/jre 。现在我已经在bashrc我的 java home 中更改为指向 jdk-1.8.0(因为我需要它指向 jdk 而不是 jre 用于其他项目)。当我运行时出现hadoop fs -ls此错误:/usr/local/hadoop/bin/hadoop: line 166: /usr/lib/jvm/java-8-openjdk-amd64/jre//bin/java: No such file or directory有谁知道如何解决这个问题?这是我的 bashrc 文件: case $- in *i*) ;; *) return;; esac HISTCONTROL=ignoreboth shopt -s histappendHISTSIZE=1000HISTFILESIZE=2000 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi case "$TERM" inxterm-color|*-256color) color_prompt=yes;; esacif [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then color_prompt=yes else color_prompt= fi fiif [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ 'elsePS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ 'fiunset color_prompt force_color_promptcase "$TERM" inxterm*|rxvt*)PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1";;*);;esacif [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto'fialias ll='ls -alF'alias la='ls -A'alias l='ls -CF'alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi
1 回答
温温酱
TA贡献1752条经验 获得超4个赞
我解决了我的问题:
我们还必须更改etc/hadoop/hadoop-env.sh
Java_home:
# set to the root of your Java installation export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_181
添加回答
举报
0/150
提交
取消