While trying to install RegCM I get configure: error: C compiler cannot create executables after executing ./configure

The quickest way to the solution is to install the build-essential meta-package.

sudo apt install build-essential