R package glmnet installation error

2.7k views Asked by At

First time post so my apologies for any posting taboos I violate.

I am following the installation instructions here: http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html with one small exception: I have obtained a tar ball and am installing from a local directory rather than a cran mirror. (I have attempted both)

I am working on a shared unix environment that I do not have sudo access to.

Using this command install.packages("full/path_to_tar/glmnet_1.9-8.tar.gz", "full/path_to_local_libs/R_libs") in R resulted in the following error:

 installing *source* package ‘glmnet’ ...
 This package requires a fortran 90 compiler. We assume
 that your fortran 90 environment is set up appropriately.
 Reference: Section on 'Using F95 code' in R-exts manual.

 R_HOME is /usr/pkgs/R/2.12.0/lib64/R
 R configured for gfortran...
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gfortran -fdefault-real-8 -ffixed-form -fpic -g -O -c  glmnet5.f90 -o glmnet5.o
makeList item: gfortran: Command not found

I referred to the reference and found that updating my PATH to use gcc.4.8.1 would alleviate this problem. I did so.

Retrying the same command resulted in the following:

installing *source* package ‘glmnet’ ...
This package requires a fortran 90 compiler. We assume
that your fortran 90 environment is set up appropriately.
Reference: Section on 'Using F95 code' in R-exts manual.
R_HOME is /usr/pkgs/R/2.12.0/lib64/R
R configured for gfortran...
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gfortran: error: unrecognized command line option ‘-rpath=/usr/pkgs/X11/R7.3-64/lib:[...]:/usr/pkgs/R/2.12.0/lib’
make: *** [glmnet.so] Error 1
ERROR: compilation failed for package ‘glmnet’

I am aware that -rpath is a valid gcc option, but I am not sure exactly why the -rpath option is being passed to gfortran, or why it is failing as a result.

Any advice would be very helpful!

0

There are 0 answers