r - 无法在 R 中安装 rgbif 包

标签 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 包。有一些错误。有人可以帮我安装吗?

最佳答案

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

Configuration failed because was not found. Try installing:

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

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

sudo apt-get install libv8-3.14-dev

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

关于r - 无法在 R 中安装 rgbif 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42185489/

相关文章:

python - 在python中连接变量名

RStudio 问题 : How do I set the base directory for "Create New Project"

mysql - 从远程服务器到远程服务器的 SSH 隧道(将 RStudio 连接到 MySQL)

r - 错误 : argument "mainPanel" is missing, 无默认值

r - Fortran 代码和发现没有调用 : 'R_registerRoutines' , 'R_useDynamicSymbols'

重新排列和排序

rSymPy 用替换的定义变量求解符号方程

r - 对数据帧执行滞后运算以计算R中的新值

Rstudio pdf knit 失败并出现 "Environment Shaded undefined"错误

rstudio - 如何在 Windows 上将 Fira 代码安装到 R-Studio?