linux java 无法执行二进制文件,linux – Logstash – 找不到任何可执行文件的java二进制文件...

我的笔记本电脑上安装了一个虚拟机上的ELK.弹出菜单正在运行.

./bin/logstash -f logstash-filter.conf给出以下错误

找不到任何可执行的java二进制文件.请在您的PATH中安装java或设置JAVA_HOME.

我尝试设置JAVA_HOME和$PATH,但仍然存在问题.我错过了什么吗?

which java

/usr/bin/java

java -version

java version "1.7.0_79"

OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)

OpenJDK 64-Bit Server VM (build 24.79-b02,mixed mode)

echo $JAVA_HOME

/usr/local/java/jdk1.8.0_45

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/divija/bin:/usr/local/java/jdk1.8.0_45/bin

logstash-filter.conf

input { stdin { } }

filter {

grok {

match => { "message" => "%{COMBINEDAPACHELOG}" }

}

date {

match => [ "timestamp","dd/MMM/yyyy:HH:mm:ss Z" ]

}

}

output {

elasticsearch { host => localhost

index=>"myindex"

}

stdout { codec => rubydebug }`enter code here`

}

你可能感兴趣的:(linux,java,无法执行二进制文件)