I am failing to install the R package gsl on my ubuntu 18.04 LTS, and I don't understand what the problem is.
From within R:
> install.packages('gsl')
* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gsl-config... /usr/bin/gsl-config
checking if GSL version >= 2.1... checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
configure: error: Need GSL version >= 1.16
ERROR: configuration failed for package ‘gsl’
* removing ‘/home/luca_ph/R/lib/R/library/gsl’
It sais it needs gsl version >= 1.16, however I have it installed:
dpkg -s libgsl-dev | grep Version
Version: 2.4+dfsg-6
Also, gsl-config is available in the $PATH (as suggested here.
I tried to pass the appropiate compiler arguments to R when calling it (as suggested here), however it fails all the same:
> gsl-config --libs
-L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm
> gsl-config --cflags
-I/usr/include
> CFLAGS="-I/usr/include" LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm" R
> install.packages('gsl')
[...]
* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gsl-config... /usr/bin/gsl-config
checking if GSL version >= 2.1... checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
configure: error: Need GSL version >= 1.16
ERROR: configuration failed for package ‘gsl’
What am I missing here?
Thanks a lot!