This may occur when attempting to run edbplus.sh and will claim that a version of Java is not found even if it exists on the computer; our example here is on the machine "espgdblv1", with Java version 1.7:
/espgdblv1/sw/postgres/edb/as9.6/edbplus> ./edbplus.sh enterprisedb@espgdblv1:5446/neapslv
expr: syntax error
/espgdblv1/sw/postgres/edb/as9.6/edbplus/etc/sysconfig/runJavaApplication.sh: line 36: [: -eq: unary operator expected
Java 1.7 or greater is not found on your machine.
The above error is due to the script runJavaApplication.sh exception located in $EDB_HOME/edbplus/etc/sysconfig
Generally, this issue can occur if we have different versions of Java installed on our system, which can cause conflicts in the JAVA_PATH field. We can verify the Java version for the installed edbplus as below to ensure that we have the necessary version of Java installed:
[root@smtp sysconfig]# cat /opt/edb/as9.6/edbplus/etc/sysconfig/edbplus-35.config
We can resolve this error by updating the Java path to the latest Java version location using the below commands:
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-220.127.116.11.x86_64 export JAVA_EXECUTABLE_PATH=/usr/lib/jvm/java-1.7.0-openjdk-18.104.22.168.x86_64/jre/bin/java
and uninstall the previous Java versions, if any are installed, to avoid conflicts.
... View more