错误描述:

在安装forecast包时需要安装RcppArmadillo依赖包,但在安装RcppArmadillo包时报下面的错误:
../inst/include/RcppArmadilloForward.h:37, from ../inst/include/RcppArmadillo.h:30, from RcppArmadillo.cpp:22: 
../inst/include/armadillo_bits/compiler_setup.hpp:119:6: error: # error "*** Need a newer compiler ***"
/picb/molsysbio/usr/liudenghui/software/R/lib/Rcpp/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
/picb/molsysbio/usr/liudenghui/software/R/lib/Rcpp/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
/picb/molsysbio/usr/liudenghui/software/R/lib/Rcpp/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
/picb/molsysbio/usr/liudenghui/software/R/lib/Rcpp/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
make: *** [RcppArmadillo.o] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/picb/molsysbio/usr/liudenghui/software/R/lib/RcppArmadillo’


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


原因:
在使用install.packages("forecast")安装包时,R会搜索最新的相关的安装包进行安装,如果操作系统的版本较低与R包不兼容,就会出现编译等错误。

解决办法:
升级系统版本或是安装较低版本的R包

下载低版本R包:
http://cran.r-project.org/src/contrib/Archive/RcppArmadillo/
http://cran.r-project.org/src/contrib/Archive/forecast/


手动安装R包:
# R CMD INSTALL -l /usr/lib64/R/library RcppArmadillo_0.3.930.1.tar.gz
# R CMD INSTALL -l /usr/lib64/R/library forecast_5.0.tar.gz




参考:
http://stackoverflow.com/questions/23921158/rcpparmadillo-compilation-error
http://www.cnblogs.com/xianghang123/archive/2011/12/06/2277644.html
GitHub 加速计划 / li / linux-dash
10
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:1 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐