Allow me to suggest that you try following the instructions for the Fresrufer cmake build located here, http://freesurfer.net/fswiki/CMake
Besides the option to build the 3rd party packages with build_packages.py script, you can also download an archive of the prebuilt packages from http://surfer.nmr.mgh.harvard.edu/pub/data/fspackages/prebuilt/
Another option would be to install the equivalent of the CentOS 7 packages on the Ubuntu system you are using, i.e., you may need to install at least cmake, so you will likely need sudo/admin privileges.