2

I have installed jdk1.6 in my RHEL 8.3 OS , and changed the JAVA_HOME to point to this folder.

However, if i do a java -version, it shows below error :

Error occurred during initialization of VM
Unable to load native library: libnsl.so.1: cannot open shared object file: No such file or directory

Have restarted the putty session but still the issue persists. Any help is appreciated..

Shubham Uniyal
  • 111
  • 1
  • 9

1 Answers1

3

You can try:

sudo dnf install libnsl

As Martin Zeitler said, if your JDK is 32 bits, it can be:

sudo dnf install libnsl.i686

But if your JDK is 64 bits, the command is:

sudo dnf install libnsl.x86_64

The problem is that the command java -version fails, so we can't see if the architecture is 32 or 64 bits.

Stéphane Millien
  • 3,238
  • 22
  • 36