Unable to install Foundation Hub on Linux due to "Existing HUB Service detected"

When installing Foundation Hub on Linux, you might see the following warning message from the installer:

WARNING! Existing HUB Service detected.
Uninstall the Existing HUB Service as root and then rerun this installer.
Command to Uninstall (as root): /app/hub/bin/daemon.sh uninstall
Exiting installation.

This error message is expected if the installation is an upgrade. In this case, the older service must be uninstalled. But after uninstalling the HUB Service as root, the old service should have been removed and this message should no longer appear.

There has been some rare cases where the the uninstall script did not remove the service. If this happens, you need to manually remove the service. This can be done by running the following command as root (where nn_n_n is the version number):

rm /etc/init.d/BIOVIA_Hub_nn_n_n