15

I have installed jdk1.8.0 manually from the oracle website.

I have followed the steps here on Digital Ocean.

When I executed java -version I got this result:-

bash: /usr/bin/java: No such file or directory

A symbolic link java is present in /usr/bin/ which is linked to another symbolic link java present in /etc/alternatives/and this link points to /usr/lib/jvm/jdk1.8.0.

I have set environment variables:- PATH,JAVA_HOME in the files ~/.bashrc and /etc/profile. Still I am getting No such file or directory.

Actually I want to install hadoop and for this the first step is to install java. I am using Ubuntu 14.04

Zanna
  • 72,312

5 Answers5

32

This is because there are some 32-bit libraries missing in your Ubuntu 64-bit. Run:

apt-get install libc6-i386

you can refer to this Stack Overflow post for more information

Zanna
  • 72,312
Maythux
  • 87,123
5

I ran into a similar issue and got it solved by

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-i386

If apt-get was not able to locate the libc-i386 package you may need to --add-architecture and run apt-get update.

Zanna
  • 72,312
LesPaul
  • 51
  • 1
  • 1
0

Try installing OpenJDK 8:

sudo apt install openjdk-8-jre

It worked for me

shivampip
  • 521
  • 4
  • 5
0

idk but this worked for me on my parrot os

cd /usr/lib/jvm
ls

Alternatively you can search for the path using

locate java-8-openjdk-amd64

Note - in my case it's openjdk8 find your java version with

java -version
0

hosted on GoDaddy and using the putty to run the liquibase DB management.

Some how it's not working and it's give me error as No Such File Found.

Below link having the solution for this problem.

JAVA_HOME=<Directory where JAVA has been extracted>/jdk1.8.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

https://www.guru99.com/how-to-install-java-on-ubuntu.html

Somnath
  • 101
  • 1