Trying to install "ndl" in R package but it fails

I am trying to install "ndl" in R but I get the following error. I've tried different mirrors but I get the same error.

install.packages("ndl")

    (as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
probando la URL 'http://cran.stat.sfu.ca/src/contrib/ndl_0.2.14.tar.gz'
Content type 'application/x-gzip' length 208459 bytes (203 Kb)
URL abierta
==================================================
downloaded 203 Kb

* installing *source* package ‘ndl’ ...
** package ‘ndl’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG   -I"/home/matias/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"  -fopenmp  -fpic  -O3 -pipe  -g  -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG   -I"/home/matias/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"  -fopenmp  -fpic  -O3 -pipe  -g  -c learn.module.cpp -o learn.module.o
g++ -shared -o ndl.so RcppExports.o learn.module.o Note: no visible binding for global variable '.Data' Note: no visible binding for global variable '.Data' -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
g++: error: Note:: No existe el archivo o el directorio
g++: error: no: No existe el archivo o el directorio
g++: error: visible: No existe el archivo o el directorio
g++: error: binding: No existe el archivo o el directorio
g++: error: for: No existe el archivo o el directorio
g++: error: global: No existe el archivo o el directorio
g++: error: variable: No existe el archivo o el directorio
g++: error: '.Data': No existe el archivo o el directorio
g++: error: Note:: No existe el archivo o el directorio
g++: error: no: No existe el archivo o el directorio
g++: error: visible: No existe el archivo o el directorio
g++: error: binding: No existe el archivo o el directorio
g++: error: for: No existe el archivo o el directorio
g++: error: global: No existe el archivo o el directorio
g++: error: variable: No existe el archivo o el directorio
g++: error: '.Data': No existe el archivo o el directorio
make: *** [ndl.so] Error 1
ERROR: compilation failed for package ‘ndl’
* removing ‘/home/matias/R/x86_64-pc-linux-gnu-library/3.0/ndl’

The downloaded source packages are in
    ‘/tmp/RtmpXQr1Rz/downloaded_packages’
Mensajes de aviso perdidos
In install.packages("ndl") :
  installation of package ‘ndl’ had non-zero exit status

Does anyone else get this error? What can I do?

Note: It won't let me post the question because it has too much code, so I'm writing this as "clarification", which makes no sense. The question is short and clear.

Upvotes: 0

Views: 235

Answers (1)

James Tobin
James Tobin

Reputation: 3110

I tried install.packages('ndl') and it worked fine for me. I'm guessing that there is a problem with the dependencies needed for ndl. These are found by looking at http://cran.r-project.org/web/packages/ndl/ndl.pdf . It looks like ndl depends on MASS and Rcpp. Try:

   install.packages('MASS')
   install.packages('Rcpp')
   install.packages('ndl')

This should manually install the dependencies for ndl.

There should be an error similar to package ‘whatever_package_is_the_problem’ was built before R 3.0.0 when you ran your install.packages('ndl'), so by running install.packages('whatever_package_is_the_problem') should rebuild the packages for R3.0.

I've had this problem with a couple other packages and this technique seems to work. Hope it works for you too!!

Upvotes: 1

Related Questions