title: "/usr/bin/javac: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"
body: <p>I installed jdk1.8.0_161 in linux server RHEL 7.. I am not able to check java version due to "/usr/bin/javac: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"</p>
  
  <p>below are the steps i followed to install jdk,</p>
  
  <pre><code>cd /opt/jdk1.8.0_161/
  alternatives --install /usr/bin/java java /opt/jdk1.8.0_161/bin/java 2
  alternatives --config java
  
  There is 1 program that provides 'java'.
  
    Selection    Command
  -----------------------------------------------
  *+ 1           /opt/jdk1.8.0_161/bin/java
  
  Enter to keep the current selection[+], or type selection number: 1
  
  alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_161/bin/jar 2
  alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_161/bin/javac 2
  alternatives --set jar /opt/jdk1.8.0_161/bin/jar
  alternatives --set javac /opt/jdk1.8.0_161/bin/javac
  
  java -version
  -bash: /usr/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
  
  
  export JAVA_HOME=/opt/jdk1.8.0_161
  export JRE_HOME=/opt/jdk1.8.0_161/jre
  export PATH=$PATH:/opt/jdk1.8.0_161/bin:/opt/jdk1.8.0_161/jre/bin
  </code></pre>