не мог установить пакет R “marmap”

Я пытаюсь установить пакет R marmap на моей рабочей станции в uni. Я выполняю Xubuntu LTS 14.04.5, версию 4.4.0-45 ядра, с версией 3.3.1 Версии 0.99.903 и R RStudio. При установке marmap пакет, существует большая (!) информация, шумящая, заканчивающаяся

** 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

Здесь, я полагал, что "ненулевой статус выхода" означает, что он не устанавливал правильно. Так, я установил бы пакет ncdf4 во-первых, только для сталкиваний со следующим:

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

Когда я пытался выполнить предложенную команду в терминале:

R CMD INSTALL --configure-args="--with-nc-config=/home/francesc/bin/nc-config" ncdf4

Ответ был следующим:

~$ 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

Теперь я немного в недоумении, кто-либо может указать на меня в правильном направлении? Очень ценивший!

PS Ранее в этом месяце, я нашел и применил суперпростую команду в командной строке, для установки пакета R, но я, может казаться, больше не нахожу. Буквально пять последовательностей слов, которые безупречно установили пакет R от терминала. Существует ли простой способ установить пакеты R из командной строки?

Francesc

1
задан 25 October 2016 в 19:14

1 ответ

ncdf4 потребуйте, чтобы системные библиотеки были установлены, таким образом, у Вас есть несколько опций:

  1. Установите предварительно созданный ncdf4 пакет из репозиториев:

    sudo apt-get install r-cran-ncdf4
    

    Это автоматически вытянет в необходимых системных зависимостях.

  2. Или, можно установить системные зависимости явно:

    sudo apt-get install netcdf-bin
    

    Затем установите пакет R:

    > install.packages('ncdf4')
    
3
ответ дан 7 December 2019 в 12:37

Другие вопросы по тегам:

Похожие вопросы: