[英]Error when compiling R packages : Eigen/Core : new: no file or directory
This is my first question on stack.这是我关于堆栈的第一个问题。 Hope I follow correctly the guidelines...
希望我正确地遵循指导方针......
So, installing several packages of R (4.2) in rstudio, I encountered the same error with several dependencies (but not all).所以,在rstudio安装几个R(4.2)的包,我遇到了几个依赖项(但不是全部)的相同错误。 Eg here for
mvtnorm
or nleqslv
(both while installing brms
).例如,此处用于
mvtnorm
或nleqslv
(两者都在安装brms
)。 (see error at the bottom of this message). (请参阅此消息底部的错误)。
It seems that the problem concerns the line 82 of the Eigen/Core header, located in Rcppeigen directory.问题似乎与位于 Rcppeigen 目录中的 Eigen/Core header 的第 82 行有关。 The
#include <new>
isn't correctly understood by the compiler.编译器无法正确理解
#include <new>
。
include new
problem: I found a little amount of similar errors, but only with quite surprising devices (like an Arduino here )...include new
问题:我发现了一些类似的错误,但只有非常令人惊讶的设备(比如这里的 Arduino)...... As I'm on a Thinkpad laptop, this shouldn't appear.因为我在 Thinkpad 笔记本电脑上,所以不应该出现。 Should I use another compiler?
我应该使用另一个编译器吗?
Thanks for your help !谢谢你的帮助 !
* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
gcc -I"/usr/include/R/" -DNDEBUG -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include/" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/RcppEigen/include/" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/RcppEigen/include/unsupported" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/BH/include" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/src/" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/RcppParallel/include/" -I"/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
Dans le fichier inclus depuis /home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/RcppEigen/include/Eigen/Dense:1,
depuis /home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
depuis <ligne-de-commande>:
/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/RcppEigen/include/Eigen/Core:82:12: erreur fatale: new : Aucun fichier ou dossier de ce type
82 | #include <new>
| ^~~~~
compilation terminée.
make: *** [/usr/lib64/R/etc/Makeconf:169 : C_FORTRAN_interface.o] Erreur 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/home/jpapir/R/x86_64-pc-linux-gnu-library/4.2/mvtnorm’
Warning in install.packages :
l'installation du package ‘mvtnorm’ a eu un statut de sortie non nul
Well, finally I solved it myself after some hours stacking with it.好吧,经过几个小时的堆叠,我终于自己解决了它。
So.所以。 In order to install Rstan, I followed these instructions .
为了安装 Rstan,我遵循了这些说明。 In order to revert it, I deleted the content of the file
.R/Makevars
and I restarted R. I don't know why it was creating this error.为了还原它,我删除了文件
.R/Makevars
的内容,然后重新启动 R。我不知道为什么会产生此错误。 But the issue seems now to be solved.但这个问题现在似乎已经解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.