0

I am trying to install R package gsl and I get

configure: error: Need GSL version >= 1.16
ERROR: configuration failed for package ‘gsl’

There is a similar post here, but the solution suggested there didn't work and I don't know where to look for the cause of the problem.

I am working on Ubuntu. I have GSL version 2.3

gsl-config --version
2.3
papgeo
  • 427
  • 3
  • 13

1 Answers1

0

I found this online and it worked (signature from the original poster):

  1. download the source package
  2. uncompress/unarchive the package
  3. delete the 2 configure scripts
  4. in src, rename Makevars.in Makevars
  5. edit Makevars, replace @GSL_CFLAGS@ with the output of 'gsl-config —cflags’ and replace @GSL_LIBS@ with the output of ‘gsl-config —libs'
  6. R CMD INSTALL the gsl directory

Hope that works, Kjell

There are also instructions in the manual of the package (for version 2.1-7.1 they are on page 33). The 2 sets of instructions are very similar, but those from the manual alone didn't work for me.

This is how my Makevars file looks like

GSL_CFLAGS = -I/usr/local/include

GSL_LIBS = -L/usr/local/lib -lgsl -lgslcblas -lm

#combine to standard arguments for R

#PKG_CPPFLAGS = $(GSL_CFLAGS) -I.

#PKG_LIBS = $(GSL_LIBS)

PKG_LIBS=-L/usr/local/lib -lgsl -lgslcblas -lm

PKG_CPPFLAGS = -I/usr/local/include

papgeo
  • 427
  • 3
  • 13