![](/img/trans.png)
[英]"fatal error: Eigen/Core: No such file or directory" when installing rpf package in rstudio
[英]Error when compiling R packages : Eigen/Core : new: no file or directory
这是我关于堆栈的第一个问题。 希望我正确地遵循指导方针......
所以,在rstudio安装几个R(4.2)的包,我遇到了几个依赖项(但不是全部)的相同错误。 例如,此处用于mvtnorm
或nleqslv
(两者都在安装brms
)。 (请参阅此消息底部的错误)。
问题似乎与位于 Rcppeigen 目录中的 Eigen/Core header 的第 82 行有关。 编译器无法正确理解#include <new>
。
include new
问题:我发现了一些类似的错误,但只有非常令人惊讶的设备(比如这里的 Arduino)......因为我在 Thinkpad 笔记本电脑上,所以不应该出现。 我应该使用另一个编译器吗?
谢谢你的帮助 !
* 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
好吧,经过几个小时的堆叠,我终于自己解决了它。
所以。 为了安装 Rstan,我遵循了这些说明。 为了还原它,我删除了文件.R/Makevars
的内容,然后重新启动 R。我不知道为什么会产生此错误。 但这个问题现在似乎已经解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.