1

I'm trying to install TensorFlow, and I get the following error:

Warning: ignoring _JAVA_OPTIONS in environment.
Couldn't find java at '/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java'.

However, when I do:

$ which java    
/usr/bin/java

And when I do:

$ whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

I definitely have Java installed, in fact I have two of them:

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  2            /usr/lib/jvm/java-8-oracle/jre/bin/java          1077      manual mod

I'm unsure what the problem is, exactly, or what is trying to use the old version of java at /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java

2
  • you should try to install openjdk 7 and see if this resolve the dependency.
    – ttoine
    Sep 19, 2016 at 14:25
  • @ttoine Unfortunately, TensorFlow does not allow me to build with a java version under 1.8 Sep 19, 2016 at 16:39

1 Answer 1

1

Okay I figured it out. I had not set the correct value for JAVA_HOME in the /etc/environment file. This is the file which is global for all users. I thought it would be updated automatically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .