[英]RcppEigen.h: No such file or directory during installation of … RcppEigen on Centos 7
I'm not new to R but can't figure out what went wrong. 我对R并不陌生,但是不知道出了什么问题。 I'm just trying to install RcppEigen package using install.packages('RcppEigen')
and receive the above error. 我只是想使用install.packages('RcppEigen')
安装RcppEigen软件包,并收到上述错误。
The command below (issued by the installer) fails: 以下命令(由安装程序发出)失败:
g++ -m64 -I/usr/include/R -DNDEBUG -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -std=c++11 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppEigen.cpp -o RcppEigen.o
I have installed both R-Rcpp and R-Rcpp-devel version 0.12.12 from EPEL repository as well as eigen3-devel v 3.2.5 (not sure whether it is required but anyway ...) 我已经从EPEL存储库以及eigen3-devel v 3.2.5中安装了R-Rcpp和R-Rcpp-devel版本0.12.12(不确定是否需要它,反正...)
I cloned RcppEigen from Github and tried to build in RStudio - the same error. 我从Github克隆了RcppEigen,并尝试在RStudio中进行构建-同样的错误。
Makevars has PKG_CXXFLAGS = -I../inst/include but the compiler is invoked as below: Makevars的PKG_CXXFLAGS = -I ../ inst / include,但是编译器的调用如下:
g++ -m64 -I/usr/include/R -DNDEBUG -I"/home/zer0hedge/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -std=c++11 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppEigen.cpp -o RcppEigen.o
For some reason, I had PKG_CXXFLAGS defined in $HOME/.R/Makevars
. 出于某种原因,我在定义PKG_CXXFLAGS $HOME/.R/Makevars
。 It erroneously overrided PKG_CXXFLAGS in Makevars in src directory of the package and prevented compilation of C++ files 它在包的src目录中错误地覆盖了Makevars中的PKG_CXXFLAGS,并阻止了C ++文件的编译
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.