ERROR: compilation failed for package ‘rlang’ in rstudio - Debian jessie 8.0

ERROR: compilation failed for package ‘rlang’ in rstudio - Debian jessie 8.0

我正在尝试在我的 Debian jessie 机器上安装 'forecast' R 包(版本 3.1.1 64 位)。

我已经安装了分析所需的其他 R 包。但是,当我尝试安装 'forecast' 包时,它需要依赖项,即 rlang、tipple 和 ggplot2。从错误日志(如下所示)来看,tipple 和 ggplot2 需要安装 rlang 才能安装它们。

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c sexp.c -o sexp.o

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c splice.c -o splice.o

In file included from splice.c:2:0:

vector.h: In function ‘namespace_rlang_sym’:

vector.h:94:19: error: ‘R_DoubleColonSymbol’ undeclared (first use in this function) return(Rf_lang3(R_DoubleColonSymbol, rlang_sym, sym)); ^ vector.h:94:19: note: each undeclared identifier is reported only once for each function it appears in

/usr/lib/R/etc/Makeconf:128: recipe for target 'splice.o' failed

make: *** [splice.o] Error 1

ERROR: compilation failed for package ‘rlang’

  • removing ‘/usr/local/lib/R/site-library/rlang’

Warning in install.packages : installation of package ‘rlang’ had non-zero exit status ERROR: dependency ‘rlang’ is not available for package ‘tibble’ * removing ‘/usr/local/lib/R/site-library/tibble’

Warning in install.packages : installation of package ‘tibble’ had non-zero exit status ERROR: dependency ‘tibble’ is not available for package ‘ggplot2’ * removing ‘/usr/local/lib/R/site-library/ggplot2’

Warning in install.packages : installation of package ‘ggplot2’ had non-zero exit status ERROR: dependency ‘ggplot2’ is not available for package ‘forecast’ * removing ‘/usr/local/lib/R/site-library/forecast’

Warning in install.packages : installation of package ‘forecast’ had non-zero exit status

rlang 安装失败并显示上述错误消息。非常感谢任何专家的帮助。

我认为问题出在你的 R 版本上,基于 this issue which generates the same error。一些 "tidyverse" 软件包,例如 tibblerlang 是最新的,需要更新的 R 版本。

所以:尝试更新您的 R 版本。最新的是 3.4.0.