dependencies - unable to install R package "marmap" - Ask Ubuntu


i trying install r package marmap on workstation @ uni. running xubuntu lts 14.04.5, kernel version 4.4.0-45, rstudio version 0.99.903 , r version 3.3.1. when installing marmap package, there a lot (!) of information buzzing by, ending with

** r ** demo ** inst ** preparing package lazy loading ** *** installing indices ** building package indices ** testing if installed package can loaded * done (igraph) * installing *source* package ‘gdistance’ ... ** package ‘gdistance’ unpacked , md5 sums checked ** r ** data ** inst ** preparing package lazy loading ** *** installing indices ** building package indices ** installing vignettes ** testing if installed package can loaded * done (gdistance) error: dependency ‘ncdf4’ not available package ‘marmap’ * removing ‘/home/francesc/r/x86_64-pc-linux-gnu-library/3.3/marmap’ warning in install.packages :   installation of package ‘marmap’ had non-zero exit status 

here, figured "non-zero exit status" means, didn't install correctly. so, i'd install package ncdf4 first, confronted following:

install.packages("ncdf4") installing package ‘/home/francesc/r/x86_64-pc-linux-gnu-library/3.3’  (as ‘lib’ unspecified) trying url 'https://cran.rstudio.com/src/contrib/ncdf4_1.15.tar.gz' content type 'unknown' length 119570 bytes (116 kb) ================================================== downloaded 116 kb  * installing *source* package ‘ncdf4’ ... ** package ‘ncdf4’ unpacked , md5 sums checked configure.ac: starting checking nc-config... no ----------------------------------------------------------------------------------- error, nc-config not found or not executable.  script comes netcdf library, version 4.1-beta2 or later, , must present configuration succeed.   if installed netcdf library (and nc-config) in standard location, nc-config should found automatically.  otherwise, can specify full path , name of nc-config script passing --with-nc-config=/full/path/nc-config argument flag configure script.  example:  ./configure --with-nc-config=/sw/dist/netcdf4/bin/nc-config  special note r users: ------------------------- pass configure flag r, use this:  r cmd install --configure-args="--with-nc-config=/home/joe/bin/nc-config" ncdf4  should replace /home/joe/bin etc. location have installed nc-config script came netcdf 4 distribution. ----------------------------------------------------------------------------------- error: configuration failed package ‘ncdf4’ * removing ‘/home/francesc/r/x86_64-pc-linux-gnu-library/3.3/ncdf4’ warning in install.packages :   installation of package ‘ncdf4’ had non-zero exit status  downloaded source packages in     ‘/tmp/rtmpc5luhz/downloaded_packages 

when tried run suggested command in terminal:

r cmd install --configure-args="--with-nc-config=/home/francesc/bin/nc-config" ncdf4 

the response following:

~$ sudo r cmd install --configure-args="--with-nc-config=/home/francesc/bin/nc-config" ncdf4 [sudo] password :  warning: invalid package ‘ncdf4’ error: error: no packages specified

now bit @ loss, can point me in right direction ? appreciated !

ps earlier month, found , applied super-simple command in command line, install r package, can't seem find anymore. literally five-word string, faultlessly installed r package terminal. there easy way install r packages command line ?

francesc

ncdf4 require system libraries installed, have couple of options:

  1. install pre-built ncdf4 package repositories:

    sudo apt-get install r-cran-ncdf4 

    this automatically pull in required system dependencies.

  2. or, can install system dependencies explicitly:

    sudo apt-get install netcdf-bin 

    then, install r package:

    > install.packages('ncdf4') 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User