Surprisingly I only needed to install a few more programs to build it successfully! Thanks for your advice. For the record, I installed a Ubuntu 16 for developers which had all the gcc, g++, gfortran, etc. Then I did what I mentioned above in the main post, and I only needed to additionally install libgmp-dev, cmake, and libpcre2-dev by looking into the errors, finding the .so that seems to be missing then searching for the exact library name using apt-cache search <some name>, and installing it with sudo apt-get install. I hope someone finds this useful.
2 Likes