[R] error installing gsl pkg

Dirk Eddelbuettel edd at debian.org
Wed Oct 3 19:05:52 CEST 2007


On 3 October 2007 at 12:25, Randy Heiland wrote:
| Thanks much for the reply.  It turns out, for reasons which are still  
| unknown to me, that on this machine, doing the following:
| 
| % g++ bessel.cpp   -o bessel -lgsl -lgslcblas
| 
| will tell me it can't find -lgsl, in spite of its path being on my  
| LD_LIBRARY_PATH.  

That is to be expected. 

LD_LIBRARY_PATH provides _run-time_ information for the system.  You are
looking for _compile-time_ and hence:

| So, being explicit solves the problem and build the  
| executable:
| 
| % g++ -v bessel.cpp   -o bessel -L<full-path> -lgsl -lgslcblas

is what you need.
 
| This then gets back to my newbie question -  can I/how can I do a  
| similar thing, i.e. manually specify a lib path for R?

This is discussed in the 'R Extensions' manual.  You could also look at what
'R CMD INSTALL --help' tells you, but this may be to terse.   In a nutshell,
you as the admin/user who place the GNU gsl in a 'unusual' location now have
to tell R's gsl package where it can find them.

Hth, Dirk

-- 
Three out of two people have difficulties with fractions.



More information about the R-help mailing list