An error trying to initialize the HPI library. Could not create the Java virtual machine.

Oracle Database/Client 11.2.0.4 Installation on RHEL/OL 8.x: Resolving "Could Not Create the Java Virtual Machine" Error

When installing Oracle Database/Client 11.2.0.4 on Red Hat Enterprise Linux (RHEL) or Oracle Linux (OL) 8.x, the Oracle Universal Installer (OUI) might fail to launch with the error:

There was an error trying to initialize the HPI library. Could not create the Java virtual machine.        


This issue arises due to missing dependencies. Below, I outline the steps to diagnose and resolve this issue.

Symptoms

During installation, the following error occurs:

Initializing Java Virtual Machine from /tmp/OraInstall<timestamp>/jdk/jre/bin/java. Please wait... There was an error trying to initialize the HPI library. 
Could not create the Java virtual machine.        


Verifying the java command from the staging directory:

$ /tmp/OraInstall<timestamp>/jdk/jre/bin/java -version There was an error trying to initialize the HPI library. Could not create the Java virtual machine.        


Cause

The missing RPM libnsl is required for compatibility with the bundled JDK version used by Oracle Universal Installer.

Checking installed libnsl packages:

# rpm -qa | grep -i libnsl libnsl2-1.2.0-2.20180605git4a062cf.el8.x86_64        


The package libnsl2 is installed, but the older libnsl package is missing.


Solution

Step 1: Install the Required libnsl Package

To resolve the issue, install the libnsl package using the following command:

shell        

Copy code

# yum install libnsl

Step 2: Verify Installation

Ensure both libnsl and libnsl2 packages are installed:

# rpm -qa | grep -i libnsl libnsl2-1.2.0-2.20180605git4a062cf.el8.x86_64 libnsl-2.28-189.5.0.1.el8_6.x86_64        


Step 3: Test the Java Command

Navigate to the java binary location in the staging directory:

# cd /tmp/OraInstall<timestamp>/jdk/jre/bin        


Verify if the java command now executes successfully:

# ./java -version java version "1.5.0_51" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_51-b10) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_51-b10, mixed mode)        


Step 4: Relaunch OUI

Once the Java Virtual Machine initializes successfully, relaunch the Oracle Universal Installer to complete the installation:

# ./runInstaller        


Conclusion

This solution ensures compatibility for Oracle Database/Client 11.2.0.4 installations on RHEL/OL 8.x by resolving dependency issues. The addition of the libnsl package allows the Java Virtual Machine to initialize properly, enabling the Oracle Universal Installer to launch without errors.




Commands Summary:

# Check existing libnsl packages
rpm -qa | grep -i libnsl

# Install missing libnsl package
yum install libnsl

# Verify installation
rpm -qa | grep -i libnsl

# Test Java version from staging location
cd /tmp/OraInstall<timestamp>/jdk/jre/bin
./java -version

# Launch Oracle Universal Installer
./runInstaller        



#OracleDatabase #LinuxAdmin #SystemAdministration #DatabaseInstallation #Oracle11g #JavaErrors #RHEL8 #OracleLinux #Troubleshooting #TechBlog #LinuxTips #DatabaseSupport #ITAdmin #SysAdminLife #JavaVirtualMachine #LinuxSolutions #DatabaseManagement































To view or add a comment, sign in

More articles by Tahmid Ul Muntakim

Insights from the community

Others also viewed

Explore topics