微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在R中安装devtools软件包时,Later.cpp中出现错误

如何解决在R中安装devtools软件包时,Later.cpp中出现错误

我正在尝试安装devtools软件包。我看到了其他相关问题,但是找不到我的错误解决方案。

这是我的sessionInfo()

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: i686-redhat-linux-gnu (32-bit)
Running under: CentOS release 6.10 (Final)

Matrix products: default
BLAS:   /usr/lib/R/lib/libRblas.so
LAPACK: /usr/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=es_ES.UTF-8        LC_COLLATE=es_ES.UTF-8
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=es_ES.UTF-8
 [7] LC_PAPER=es_ES.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  Grdevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0

我尝试过的事情:

> install.packages('devtools',dependencies = TRUE)
* installing *source* package ‘later’ ...
** package ‘later’ successfully unpacked and MD5 sums checked
** using staged installation
Running configure script
-latomic linker flag needed.
** libs
g++ -m32 -std=gnu++0x -I"/usr/include/R" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/usr/lib/R/library/Rcpp/include" -I"/usr/lib/R/library/BH/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c RcppExports.cpp -o RcppExports.o
g++ -m32 -std=gnu++0x -I"/usr/include/R" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/usr/lib/R/library/Rcpp/include" -I"/usr/lib/R/library/BH/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c callback_registry.cpp -o callback_registry.o
g++ -m32 -std=gnu++0x -I"/usr/include/R" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/usr/lib/R/library/Rcpp/include" -I"/usr/lib/R/library/BH/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c debug.cpp -o debug.o
gcc -m32 -std=gnu99 -I"/usr/include/R" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/usr/lib/R/library/Rcpp/include" -I"/usr/lib/R/library/BH/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fpic -fPIC   -c init.c -o init.o
g++ -m32 -std=gnu++0x -I"/usr/include/R" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/usr/lib/R/library/Rcpp/include" -I"/usr/lib/R/library/BH/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c later.cpp -o later.o
In file included from later.cpp:13:
callback_registry_table.h: In member function ‘void CallbackRegistryTable::create(int,int)’:
callback_registry_table.h:73: error: ‘nullptr’ no se declaró en este ámbito
(...)
make: *** [later.o] Error 1
ERROR: compilation Failed for package ‘later’
* removing ‘/usr/lib/R/library/later’
Warning messages:
1: In install.packages("devtools",dependencies = TRUE) :
  installation of package ‘later’ had non-zero exit status

我下载了软件包并尝试过,但是有类似的错误

> install.packages('devtools_2.3.2.tar.gz',repos=NULL,type="source")
Installing package into ‘/usr/lib/R/library’
(as ‘lib’ is unspecified)
ERROR: dependency ‘DT’ is not available for package ‘devtools’
* removing ‘/usr/lib/R/library/devtools’
Warning message:
In install.packages("/root/devtools_2.3.2.tar.gz",repos = NULL,:
  installation of package ‘/root/devtools_2.3.2.tar.gz’ had non-zero exit status

我在做什么错?谢谢

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。