R Rcpp在R 3.1.0中安装错误 [英] R Rcpp install error in R 3.1.0

查看:223
本文介绍了R Rcpp在R 3.1.0中安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 install.packages(Rcpp)安装Rcpp,但失败了。
错误信息:

pre code安装源代码包'Rcpp'...
**软件包'Rcpp'成功解压并检查MD5总和
** libs
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I ../ inst / include / -I / usr / local / include -fpic -g -O2 -c Date.cpp -o Date.o
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I ../ inst / include / -I / usr / local / include -fpic -g -O2 -c Module.cpp -o Module.o
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I ../ inst / include / - I / usr / local / include -fpic -g -O2 -c Rcpp_init.cpp -o Rcpp_init.o
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I ../ inst / include / -I / usr / local / include -fpic -g -O2 -c api.cpp -o api.o
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I ../ inst / include / -I / usr / local / include -fpic -g -O2 -c attributes.cpp -o attributes.o
g ++ -I / usr / local / lib64 / R / include -DNDEBUG -I .. / inst / include / -I / usr / local / include -fpic -g -O2 -c barrier.cpp -o barrier.o
g ++ -shared -L / usr / local / lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
安装到/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/ Rcpp / libs
** R
** inst
**为延迟加载准备包
**帮助
***安装帮助索引
* *构建软件包索引
**安装静态文件
**测试是否可以加载已安装的软件包
dyn.load中的错误(文件,DLLpath = DLLpath,...):
无法加载共享对象'/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs/Rcpp.so':
/ home / sethbrin / R / x86_64-redhat-linux -gnu-library / 3.1 / Rcpp / libs / Rcpp.so:undefined symbol:_ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode
错误:加载失败
执行暂停
错误:加载失败
*去掉'/ home /sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp'

下载的源文件包位于
'/ tmp / Rtmp6PKB8N / downloaded_pa​​ckages'
警告我ssage:
在install.packages(Rcpp)中:
安装包'Rcpp'具有非零退出状态

然后我使用

$ c $ fit $ _c $ c b std :: basic_streambuf< char,std :: char_traits< char> > :: seekoff(long long,std :: _ Ios_Seekdir,std :: _ Ios_Openmode)

我有寻找一些解决方案。这似乎是因为gcc版本。但我不知道如何改变R用于编译Rcpp包的gcc版本。 CRAN 测试 Rcpp ,就像其他6700+包一样。



您可以看到汇总测试报告,测试设置包括两台基于Fedora的机器:



因为您的问题可能是本地的,或者仅仅是由于使用较旧的设置。在这种情况下,存档部分可让您访问旧版本。


I want to install Rcpp using install.packages("Rcpp"), but it failed. The error message:

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c Date.cpp -o Date.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c Module.cpp -o Module.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c api.cpp -o api.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -shared -L/usr/local/lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
installing to /home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
unable to load shared object '/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs/Rcpp.so':
 /home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs/Rcpp.so: undefined symbol: _ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp’

The downloaded source packages are in
‘/tmp/Rtmp6PKB8N/downloaded_packages’
Warning message:
In install.packages("Rcpp") :
installation of package ‘Rcpp’ had non-zero exit status

Then I use

c++fit _ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode

std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

I have searched for some solutions for that. It seems that it is because of the gcc version. But I don't know how to change the gcc version that R uses to compile Rcpp package.

解决方案

CRAN tests Rcpp just like any other of the (by now) 6700+ package.

You can see the aggregate test report and the test setups includes two Fedora-based machines:

As such your problems are possibly local, or simply due to using an older setup. In which case the Archive section gives you access to an older version.

这篇关于R Rcpp在R 3.1.0中安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆