在R中安装bsts包的错误 [英] install error of bsts package in R
问题描述
在CentOS 6.3上安装R软件包 bsts 失败与下面的(截断)错误。我已经尝试将这里更新为GCC版本4.8.2 。还有其他建议吗?
- 安装 b $ b **程序包Boom已成功解压缩并检查MD5总数
** libs
g ++ -m64 -std = c ++ 0x -I / usr / include / R -DNDEBUG -I。 -I ../ inst / include -IBmath -Imath / cephes -Icblas -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DRLANGUAGE -I / usr / local / include -I/ usr / lib64 / R / library / BH / include-fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector --param = ssp-buffer-size = 4 -m64 -mtune = generic -c Models / Bart / Bart.cpp -o Models /Bart/Bart.o
Models / Bart / Bart.cpp:在成员函数'void BOOM :: Bart :: VariableSummary :: finalize(int,
BOOM :: Bart :: ContinuousCutpointStrategy)':
Models / Bart / Bart.cpp:110:65:warning:有符号和无符号整数表达式之间的比较[-Wsign-compare]
if(number_of_unique_values< obser_values_.size()){
^
Models / Bart / Bart.cpp:117:65:warning:有符号和无符号整数表达式之间的比较[-Wsign-compare]
if(number_of_unique_values< obser_values_.size()){
^
Models / Bart / Bart.cpp:129:61:warning:有符号和无符号整数表达式之间的比较[-Wsign-compare]
if(number_of_unique_values< observe_values_.size()){
^
>
Models / Bart / Bart.cpp:1393:50:warning:有符号和无符号整数表达式之间的比较[-Wsign-compare]
if(number_of_trees_to_remove> = trees_.size()){
^
{标准输入}:汇编消息:
{标准输入}:71:错误:
{标准输入}:664:错误:在`rep'之后需要字符串指令
{标准输入}:617: :727:错误:在`rep'之后遇到字符串指令
{标准输入}:790:错误:在`rep'之后需要字符串指令
{标准输入}:1171:
{标准输入}:1231:错误:在`rep'之后需要字符串指令
{标准输入}:1180:错误: :2704:错误:在`rep'之后遇到字符串指令
{标准输入}:2796:错误:在`rep'之后遇到字符串指令
{标准输入}:7412:
{标准输入}:19481:错误:在`rep'之后需要字符串指令
{标准输入} :23959:错误:在`rep'之后遇到字符串指令
make:*** [Models / Bart / Bart.o]错误1
错误:程序包Boom的编译失败
*删除'/ usr / lib64 / R / library / Boom'
错误:dependency'Boom'不适用于包'BoomSpikeSlab'
*删除'/ usr / lib64 / R / library / BoomSpikeSlab'
错误:dependencies'BoomSpikeSlab','Boom'不可用于包'bsts'
*删除'/ usr / lib64 / R / library / bsts'
下载的源软件包在
'/ tmp / Rtmpf9YQJJ / downloaded_packages'
更新'.Library'中的软件包的HTML索引
make'packages.html'... done
'/ usr / lib64 / R / bin / R'--vanilla CMD INSTALL \
'/ tmp / Rtmpf9YQJJ / devtoolsa12a5ce5a465 / google-CausalImpact-9c9286f'\
--library ='/ usr / lib64 / R / library'--install-tests
错误:依赖'bsts'不可用于包'CausalImpact'
*删除'/ usr / lib64 / R / library / CausalImpact'
错误:命令失败(1)
此外:警告消息:
1:在utils :: install.packages(deps,dependencies = NA,Ncpus = threads):
安装的包'Boom'有非零退出状态
2:在utils :: install.packages(deps,dependencies = NA,Ncpus = threads):
安装的包'BoomSpikeSlab'有非零退出状态
3:在utils :: install.packages(deps,dependencies = NA,Ncpus = threads):
安装程序包'bsts'有非零退出状态
解决方案在我的例子中,安装C ++和Fortran编译器的新版本a href =http://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux/36034866#36034866> R软件包Boom无法在Ubuntu linux上安装,帽子提示Dirk Eddelbuettel)。我之前版本4.8,他们没有工作。
我不知道如何在CentOS上,但我确定可以升级编译器单向或其他。 Ubuntu(14.04)的步骤是:
- 添加
ubuntu-toolchain-r
PPA与add-apt-repository
。我另外使用固定( https://help.ubuntu.com/community/PinningHowto ),以便 c> gfortran-4.9 / code>。
- 设置环境变量
CXX = g ++ - 4.9
和CXX1X = g ++ -4.9
在〜/ .R / Makevars
或您的/ etc / R / Makeconf
。
- 安装Boom。
Installation of the R package bsts on CentOS 6.3 fails with (truncated) error below. I already tried updating GCC to version 4.8.2 as suggested here. Any other suggestions?
- installing source package ‘Boom’ ... ** package ‘Boom’ successfully unpacked and MD5 sums checked ** libs g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I. -I../inst/include -IBmath -Imath/cephes -Icblas -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DRLANGUAGE -I/usr/local/include -I"/usr/lib64/R/library/BH/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Models/Bart/Bart.cpp -o Models/Bart/Bart.o Models/Bart/Bart.cpp: In member function ‘void BOOM::Bart::VariableSummary::finalize(int, BOOM::Bart::ContinuousCutpointStrategy)’: Models/Bart/Bart.cpp:110:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^ Models/Bart/Bart.cpp:117:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^ Models/Bart/Bart.cpp:129:61: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^
Lots of this:
Models/Bart/Bart.cpp:1393:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_trees_to_remove >= trees_.size()) { ^ {standard input}: Assembler messages: {standard input}:71: Error: expecting string instruction after `rep' {standard input}:617: Error: expecting string instruction after `rep' {standard input}:664: Error: expecting string instruction after `rep' {standard input}:727: Error: expecting string instruction after `rep' {standard input}:790: Error: expecting string instruction after `rep' {standard input}:1171: Error: expecting string instruction after `rep' {standard input}:1180: Error: expecting string instruction after `rep' {standard input}:1231: Error: expecting string instruction after `rep' {standard input}:2704: Error: expecting string instruction after `rep' {standard input}:2796: Error: expecting string instruction after `rep' {standard input}:7412: Error: expecting string instruction after `rep' {standard input}:7504: Error: expecting string instruction after `rep' {standard input}:19481: Error: expecting string instruction after `rep' {standard input}:23959: Error: expecting string instruction after `rep' make: *** [Models/Bart/Bart.o] Error 1 ERROR: compilation failed for package ‘Boom’ * removing ‘/usr/lib64/R/library/Boom’ ERROR: dependency ‘Boom’ is not available for package ‘BoomSpikeSlab’ * removing ‘/usr/lib64/R/library/BoomSpikeSlab’ ERROR: dependencies ‘BoomSpikeSlab’, ‘Boom’ are not available for package ‘bsts’ * removing ‘/usr/lib64/R/library/bsts’ The downloaded source packages are in ‘/tmp/Rtmpf9YQJJ/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done '/usr/lib64/R/bin/R' --vanilla CMD INSTALL \ '/tmp/Rtmpf9YQJJ/devtoolsa12a5ce5a465/google-CausalImpact-9c9286f' \ --library='/usr/lib64/R/library' --install-tests ERROR: dependency ‘bsts’ is not available for package ‘CausalImpact’ * removing ‘/usr/lib64/R/library/CausalImpact’ Error: Command failed (1) In addition: Warning messages: 1: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) : installation of package ‘Boom’ had non-zero exit status 2: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) : installation of package ‘BoomSpikeSlab’ had non-zero exit status 3: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) : installation of package ‘bsts’ had non-zero exit status
解决方案In my case installing new versions (4.9) of C++ and Fortran compilers helped (see R package 'Boom' fails to install on Ubuntu linux, hat tip to Dirk Eddelbuettel). I had versions 4.8 earlier and they did not work.
I am not sure how to do that on CentOS, but I am sure it is possible to upgrade the compilers one way or another. The steps for Ubuntu (14.04) are:
- Add
ubuntu-toolchain-r
PPA withadd-apt-repository
. I additionally used pinning (https://help.ubuntu.com/community/PinningHowto) so that other packages are not automatically updated from that PPA.- Install packages
g++-4.9
andgfortran-4.9
.- Set the environment variables
CXX=g++-4.9
andCXX1X=g++-4.9
in either~/.R/Makevars
or your/etc/R/Makeconf
.- Install 'Boom'.
这篇关于在R中安装bsts包的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!