I ran into several issues when trying to install 4.0.0 - I attempted to install the free edition at first - although I had the same issue trying to install the enterprise evaluation edition.
My OS is Ubuntu 20.04, fresh install.
I've installed OpenJDK, java --version returns the right openJDK (version 15 in my case).
I can verify that $JAVA_HOME is properly set, and that $PATH includes $JAVA_HOME/bin
Hurdle#1: I was able to fix it: rhe installer erases the content of /opt/mango including overrides/properties (the script stops at line 146). Remedy: I added two lines in the script: mkdir /opt/mango/overrides and mkdir /opt/mango/overrides/properties.
Hurdle#2: I got stuck on this. the script starts generating the keys - but.... genkey.sh fails at line 15 - it looks like the script cannot find the "keytool". And even if i had managed to "fix" genkey.sh, if I rerun the installer, the content of /opt/mango would be deleted anyway.... This is where I decided to stop and write this post.
Please, let me know if you have a path to solve this issue. Thanks