Installing the gsl package for R on Linux Mint 18

Today I was trying to install the MBESS package. One of its dependencies is the gsl package. However, trying to install that package gave the following error:

cp: cannot stat '*.gcno': No such file or directory
Makevars:45: recipe for target 'save-gcno' failed
make: [save-gcno] Error 1 (ignored)

Googling it gave 0 results, which is a bad sign, because most bugs we solve by googling the solution that other people who already solved it posted. However, in this case, the solution is simple:

sudo apt-get install r-cran-gsl