If you won't be able to install by this process, then an easy procedure is also there. It is Gromacs 4.0.7 version but works fine. Just install Ubuntu 10.04 LTS operating system in your computer and then from synaptic package manager, you can directly install the Gromacs 4.0.7 by just selecting the package.
Follow the instruction in this bioinformatics review: https://bioinformaticsreview.com/20151126/how-to-install-gromacs-5-x-x-on-linux-ubuntu-14-04-lts/