74bbf1d81bdc64b42d6397eb8fb95d8403ed7ad5
max
  Tue Feb 6 02:44:24 2024 -0800
fix for GBIC for Ubuntu 21 and later, email from Glenn

diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh
index 35a6523..e3a8755 100644
--- src/product/installer/browserSetup.sh
+++ src/product/installer/browserSetup.sh
@@ -1003,43 +1003,49 @@
        echo2 Running apt-get update
        apt-get update
        touch /tmp/browserSetup.aptGetUpdateDone
     fi
 
     # the new tzdata package comes up interactive questions, suppress these
     export DEBIAN_FRONTEND=noninteractive
 
     echo2 Installing ghostscript and imagemagick
     waitKey
     # ghostscript for PDF export
     # imagemagick for the session gallery
     # r-base-core for the gtex tracks
     # python-mysqldb for hgGeneGraph
     apt-get --no-install-recommends --assume-yes install ghostscript imagemagick wget rsync r-base-core curl gsfonts
-    # python-mysqldb has been removed in newer distros
+    # python-mysqldb has been removed in almost all distros as of 2021
     if apt-cache policy python-mysqldb | grep "Candidate: .none." > /dev/null; then 
 	    echo2 The package python-mysqldb is not available anymore. Working around it
 	    echo2 by installing python2 and MySQL-python with pip2
+	    if apt-cache policy python2 | grep "Candidate: .none." > /dev/null; then 
+               # Ubuntu >= 21 does not have python2 anymore - hgGeneGraph has been ported, so not an issue anymore
+   	       echo2 Python2 package is not available either for this distro, so not installing Python2 at all.
+	    else
+               # workaround for Ubuntu 16-20 - keeping this section for a few years, just in case
                apt-get install --assume-yes python2 libmysqlclient-dev python2-dev wget gcc
     	       curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output /tmp/get-pip.py
     	       python2 /tmp/get-pip.py
                if [ -f /usr/include/mysql/my_config.h ]; then
                    echo my_config.h found
                else
                    wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -P /usr/include/mysql/
                fi
                pip2 install MySQL-python
+	    fi
     else
 	    apt-get --assume-yes install python-mysqldb
     fi
 
     if [ ! -f $APACHECONF ]; then
         echo2
         echo2 Now installing Apache2.
         echo2 "Apache's default config /etc/apache2/sites-enable/000-default will be"
         echo2 "deactivated. A new configuration $APACHECONF will be added and activated."
         echo2 The apache modules include, cgid and authz_core will be activated.
         waitKey
 
         # apache and mysql are absolutely required
         # ghostscript is required for PDF output
         apt-get --assume-yes install apache2 ghostscript