This question already has an answer here:
这个问题在这里已有答案:
- Java is installed, in listing, but execution produces “./java: No such file or directory” 2 answers
- 在列表中安装了Java,但执行产生“./java:没有这样的文件或目录”2个答案
I have a Debian Wheezy Linux, which gives me this most puzzling output:
我有一个Debian Wheezy Linux,它给了我最令人费解的输出:
root@server:~# ls -al /opt/jdk1.7.0_51/jre/bin/java
-rwxrwxrwx 1 root root 7718 Dec 19 03:13 /opt/jdk1.7.0_51/jre/bin/java
root@server:~# /opt/jdk1.7.0_51/jre/bin/java
-bash: /opt/jdk1.7.0_51/jre/bin/java: No such file or directory
So it can see the java executable (verified via cat that it is an executable indeed) but can't see it the same time. Any pointers?
所以它可以看到java可执行文件(通过cat验证它确实是可执行文件)但是无法同时看到它。有什么指针吗?
1 个解决方案
#1
1
It turns out we have installed a wrong version of java:
事实证明我们安装了错误版本的java:
jdk-7u51-linux-x64.tar.gz
instead of the correct
而不是正确的
jdk-7u51-linux-i586.tar.gz
one. The nature and cause of the error message still eludes me though.
一。然而,错误消息的性质和原因仍然存在。
#1
1
It turns out we have installed a wrong version of java:
事实证明我们安装了错误版本的java:
jdk-7u51-linux-x64.tar.gz
instead of the correct
而不是正确的
jdk-7u51-linux-i586.tar.gz
one. The nature and cause of the error message still eludes me though.
一。然而,错误消息的性质和原因仍然存在。