Estou tentando instalar o pacote R marmap
em minha estação de trabalho na uni. Estou executando o Xubuntu LTS 14.04.5, versão do kernel 4.4.0-45, com o RStudio Versão 0.99.903 e o R versão 3.3.1. Ao instalar o pacote marmap
, há muitas (!) Informações correndo, terminando com
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (igraph)
* installing *source* package ‘gdistance’ ...
** package ‘gdistance’ successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (gdistance)
ERROR: dependency ‘ncdf4’ is not available for 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
Aqui, percebi que "status de saída diferente de zero" significa que ele não foi instalado corretamente. Então, eu instalaria o pacote ncdf4
primeiro, apenas para ser confrontado com o seguinte:
install.packages("ncdf4") Installing package into ‘/home/francesc/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is 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’ successfully unpacked and MD5 sums checked
configure.ac: starting
checking for nc-config... no
-----------------------------------------------------------------------------------
Error, nc-config not found or not executable. This is a script that comes with the
netcdf library, version 4.1-beta2 or later, and must be present for configuration
to succeed.
If you installed the netcdf library (and nc-config) in a standard location, nc-config
should be found automatically. Otherwise, you can specify the full path and name of
the nc-config script by passing the --with-nc-config=/full/path/nc-config argument
flag to the configure script. For example:
./configure --with-nc-config=/sw/dist/netcdf4/bin/nc-config
Special note for R users:
-------------------------
To pass the configure flag to R, use something like this:
R CMD INSTALL --configure-args="--with-nc-config=/home/joe/bin/nc-config" ncdf4
where you should replace /home/joe/bin etc. with the location where you have
installed the nc-config script that came with the netcdf 4 distribution.
-----------------------------------------------------------------------------------
ERROR: configuration failed for 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
The downloaded source packages are in
‘/tmp/RtmpC5Luhz/downloaded_packages
Quando tentei executar o comando sugerido em um terminal:
R CMD INSTALL --configure-args="--with-nc-config=/home/francesc/bin/nc-config" ncdf4
A resposta foi a seguinte:
~$ sudo R CMD INSTALL --configure-args="--with-nc-config=/home/francesc/bin/nc-config" ncdf4
[sudo] password for :
Warning: invalid package ‘ncdf4’
Error: ERROR: no packages specified
Agora estou um pouco perdido, alguém pode me apontar na direção certa? Muito apreciado!
PS No início deste mês, encontrei e apliquei um comando super-simples na linha de comando, para instalar um pacote R, mas parece que não consigo mais encontrar. Literalmente uma string de cinco palavras, que instalou um pacote R sem falhas a partir do terminal. Existe uma maneira fácil de instalar pacotes R a partir da linha de comando?
Francesc