Linux Installer Won't Run

First, we'll describe the basic operational elements of the installer program and process. Then we'll describe workarounds and debugging options. 

Phase 1: Self-extracting Shell Script Operation

The linux/unix installer program, such as, consist of a combined shell script (created by public domain MakeSelf program) and payload file that are processed by the script portion of the file using the tail command on itself to extract the payload portion and feed it to the tar command. It extracts the payload into a subdirectory under the user's $HOME location named by $targetdir variable in the script. In this case, that is Installer.linuxx8664. 
Prior to the extraction, the program also runs a checksum (either CRC or md5) to confirm it is correctly downloaded. The program also allows some command-line arguments. The one of most interest to us is the --keep argument which tells the program not to delete the extracted payload subdirectory when the installation is completed. This is useful if there is a problem running the java installer portion of the installation process. 

[17] $HOME hqlinux64amd: head -10 
CMD_ENV=xpg4;export CMD_ENV 
# This script was generated using Makeself 1.5.5 
label="chemkin15082 For linuxx8664" 
scriptargs="-cp . -DHOSTNAME=`hostname` Installer" 

The skip variable contains the line number of the first line of payload information. This is extracted by the following line (and you may find more than one similar line) within the script portion: 

if ( cd "$location"; tail +$skip $0; ) | gzip -cd | UnTAR | (while read a; do $NoNewLine ".$ECHO_TAIL"; done; echo; ); then 

Basically, the above is extracting the payload from itself (the $0 argument) and piping it to gzip and from there to UnTAR (an alias it has defined for the tar command) and piping further to a while read loop. 

Phase 2: Java Installer Program Execution

Once all that payload extraction is accomplished, then this command is executed: 

$script $scriptargs

Which expands to 

./jre/bin/java -cp . -DHOSTNAME=`hostname` Installer 

This runs our local copy of java (included with the installation) to run the "Installer.class" compiled java program. The -cp . Tells java to look in the local directory (.) for any other java class files that are referenced. And the -DHOSTNAME passes the hostname string for use in suggesting the default license file location. 

Troubleshooting/Bypassing the Self-Extracting Script

The easiest thing to do is bypass the script entirely by extracting the payload and uncompressing it. Here is an example:

[19] $HOME hqlinux64amd: tail +266 >payload.tar.gz 
[20] $HOME hqlinux64amd: mkdir Installer.linuxx8664 
[21] $HOME hqlinux64amd: mv payload.tar.gz Installer.linuxx8664/ 
[22] $HOME hqlinux64amd: cd Installer.linuxx8664/ 
[23] $HOME/Installer.linuxx8664 hqlinux64amd: tar xvfz payload.tar.gz 

At this point, you have the payload extracted to the Installer.linuxx8664 directory and are ready to run the java program to perform the installation. The contents in this directory consist of 

  •  A large jar file containing our program files to be installed (similar to a windows cabinet file or a tar file, but in a format java uses) 
  •  Jre subdirectory containing the java runtime files 
  •  Class files for the installer (these are compiled java code that contain the installer program) 
  •  A shell script for detecting versions of linux and license.txt file 

Troubleshooting Java Installer Program Execution

Run the standard command to launch the java installer program:

./jre/bin/java -cp . -DHOSTNAME=`hostname` Installer 

If this program fails to run, it is most likely because there are system libraries that the jre is expecting to use that are not present. This can be due to the version of linux operating system being much newer than the java runtime environment (jre) that we distribute with our installer or it can be due to other miscellaneous reasons. 

Step 1: test that java can run: 

./jre/bin/java -version 

This should run and report the version of java that are jre contains. If this fails to run, then check for an existing compatible java being already installed on the machine: 

which java 

The above will report the executable path(s) to the java program. Try using that java to run the installer. Once the installer has run, also modify the chemkin launch script in the bin subdirectory (and the energico launch script if present) to reference the system's version of java instead of our jre version.