无法在R中安装rgbif软件包

时间:2017-02-12 08:11:54

标签: r rstudio

我试图使用install.package()在R上安装rgbif包,但我遇到了一些错误。代码如下:

> install.packages("rgbif")
Installing package into ‘/home/djokester/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘V8’

trying URL 'https://cran.rstudio.com/src/contrib/V8_1.2.tar.gz'
Content type 'application/x-gzip' length 325718 bytes (318 KB)
==================================================
downloaded 318 KB

trying URL 'https://cran.rstudio.com/src/contrib/rgbif_0.9.7.tar.gz'
Content type 'application/x-gzip' length 684603 bytes (668 KB)
==================================================
downloaded 668 KB

* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/include/v8-3.14
Using PKG_LIBS=-lv8
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because  was not found. Try installing:
 * deb: libv8-3.14-dev (formerly: libv8-dev) (Debian, Ubuntu)
 * rpm: v8-314-devel (formerly: v8-devel) (Fedora, EPEL)
 * brew: v8-315 (OSX) -- NOT regular v8! Tap from homebrew/versions
 * csw: libv8_dev (Solaris)
To use a custom libv8, set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘V8’
* removing ‘/home/djokester/R/x86_64-pc-linux-gnu-library/3.3/V8’
Warning in install.packages :
  installation of package ‘V8’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘rgbif’
* removing ‘/home/djokester/R/x86_64-pc-linux-gnu-library/3.3/rgbif’
Warning in install.packages :
  installation of package ‘rgbif’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpCJKNuX/downloaded_packages’

我正在尝试在Ubuntu 16.10上安装rgbif包。有一些错误。有人可以帮我安装吗?

1 个答案:

答案 0 :(得分:3)

错误消息告诉您缺少Ubuntu包libv8-dev

  

配置失败,因为找不到。尝试安装:

     
      
  • deb:libv8-3.14-dev(原名:libv8-dev)(Debian,Ubuntu)
  •   

要安装它,请在命令行上运行以下命令:

sudo apt-get install libv8-3.14-dev

或者使用Synaptic安装libv8-3.14-dev。之后,您应该可以使用rgbif在R中安装install.packages("rgbif")