I'm trying to install the package brms
in R so that I can rename the parameters returned from the function stan
(from the rstan
package). When I try install.package("brms", dependencies=TRUE)
, I get the (partial) output pasted at the end of this post (it's too long to paste the whole thing). At the end of the output, you can see that I get a series of "dependency errors", which makes sense because the very first error is not a dependency error, but rather a compilation error that says:
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: init.o] Error 1
ERROR: compilation failed for package ‘statmod’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/statmod’
So the following errors occur because of this first one. But I don't know how to fix this compilation error.
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:439,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h: In instantiation of ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 0>’:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:300:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 1>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:551:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 3>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseBase.h:41:34: required from ‘class Eigen::DenseBase<Eigen::Matrix<float, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/MatrixBase.h:48:34: required from ‘class Eigen::MatrixBase<Eigen::Matrix<float, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h:98:7: required from ‘class Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/Matrix.h:178:7: required from ‘class Eigen::Matrix<float, 4, 1>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:46:50: required from ‘class Eigen::QuaternionBase<Eigen::Quaternion<float> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:250:7: required from ‘class Eigen::Quaternion<float>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:27:3: required from here
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<float>::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
55 | >::type PacketReturnType;
| ^~~~~~~~~~~~~~~~
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:370,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::find_best_packet<double, 4>’:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/Matrix.h:22:57: required from ‘struct Eigen::internal::traits<Eigen::Matrix<double, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:242:7: required from ‘struct Eigen::internal::traits<Eigen::Quaternion<double> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:88:47: required from here
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:44: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
187 | bool Stop = Size==Dynamic || (Size%unpacket_traits<PacketType>::size)==0 || is_same<PacketType,typename unpacket_traits<PacketType>::half>::value>
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
187 | bool Stop = Size==Dynamic || (Size%unpacket_traits<PacketType>::size)==0 || is_same<PacketType,typename unpacket_traits<PacketType>::half>::value>
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::unpacket_traits<__vector(2) double>::half’ {aka ‘__vector(2) double’} [-Wignored-attributes]
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:205:88: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
205 | typedef typename find_best_packet_helper<Size,typename packet_traits<T>::type>::type type;
| ^~~~
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:439,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h: In instantiation of ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 0>’:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:300:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 1>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:551:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 3>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseBase.h:41:34: required from ‘class Eigen::DenseBase<Eigen::Matrix<double, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/MatrixBase.h:48:34: required from ‘class Eigen::MatrixBase<Eigen::Matrix<double, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h:98:7: required from ‘class Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 1> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/Matrix.h:178:7: required from ‘class Eigen::Matrix<double, 4, 1>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:46:50: required from ‘class Eigen::QuaternionBase<Eigen::Quaternion<double> >’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:250:7: required from ‘class Eigen::Quaternion<double>’
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:92:3: required from here
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
55 | >::type PacketReturnType;
| ^~~~~~~~~~~~~~~~
make: *** [/usr/lib/R/etc/Makeconf:177: RcppExports.o] Error 1
ERROR: compilation failed for package ‘mice’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/mice’
Warning in install.packages :
installation of package ‘mice’ had non-zero exit status
* installing *source* package ‘ape’ ...
** package ‘ape’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/unsupported" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/BH/include" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/src/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I'/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c BIONJ.c -o BIONJ.o
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:88,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:1: error: unknown type name ‘namespace’
628 | namespace Eigen {
| ^~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
628 | namespace Eigen {
| ^
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include <complex>
| ^~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: BIONJ.o] Error 1
ERROR: compilation failed for package ‘ape’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/ape’
Warning in install.packages :
installation of package ‘ape’ had non-zero exit status
* installing *source* package ‘statmod’ ...
** package ‘statmod’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls -fpic -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -c gaussq2.f -o gaussq2.o
gcc -I"/usr/share/R/include" -DNDEBUG -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/unsupported" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/BH/include" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/src/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:88,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:1: error: unknown type name ‘namespace’
628 | namespace Eigen {
| ^~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
628 | namespace Eigen {
| ^
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include <complex>
| ^~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: init.o] Error 1
ERROR: compilation failed for package ‘statmod’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/statmod’
Warning in install.packages :
installation of package ‘statmod’ had non-zero exit status
ERROR: dependencies ‘sp’, ‘terra’ are not available for package ‘raster’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/raster’
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
ERROR: dependencies ‘mvtnorm’, ‘expm’ are not available for package ‘msm’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/msm’
Warning in install.packages :
installation of package ‘msm’ had non-zero exit status
ERROR: dependency ‘proxy’ is not available for package ‘e1071’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/e1071’
Warning in install.packages :
installation of package ‘e1071’ had non-zero exit status
ERROR: dependency ‘mvtnorm’ is not available for package ‘bridgesampling’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/bridgesampling’
Warning in install.packages :
installation of package ‘bridgesampling’ had non-zero exit status
ERROR: dependency ‘mvtnorm’ is not available for package ‘emmeans’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/emmeans’
Warning in install.packages :
installation of package ‘emmeans’ had non-zero exit status
ERROR: dependencies ‘mvtnorm’, ‘RcppArmadillo’ are not available for package ‘projpred’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/projpred’
Warning in install.packages :
installation of package ‘projpred’ had non-zero exit status
ERROR: dependency ‘tmvnsim’ is not available for package ‘mnormt’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/mnormt’
Warning in install.packages :
installation of package ‘mnormt’ had non-zero exit status
ERROR: dependency ‘ape’ is not available for package ‘MCMCglmm’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/MCMCglmm’
Warning in install.packages :
installation of package ‘MCMCglmm’ had non-zero exit status
ERROR: dependency ‘RcppArmadillo’ is not available for package ‘splines2’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/splines2’
Warning in install.packages :
installation of package ‘splines2’ had non-zero exit status
ERROR: dependency ‘e1071’ is not available for package ‘classInt’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/classInt’
Warning in install.packages :
installation of package ‘classInt’ had non-zero exit status
ERROR: dependencies ‘sp’, ‘raster’ are not available for package ‘spData’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/spData’
Warning in install.packages :
installation of package ‘spData’ had non-zero exit status
ERROR: dependencies ‘evd’, ‘msm’, ‘gsl’ are not available for package ‘rtdists’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/rtdists’
Warning in install.packages :
installation of package ‘rtdists’ had non-zero exit status
ERROR: dependencies ‘bridgesampling’, ‘nleqslv’ are not available for package ‘brms’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/brms’
Warning in install.packages :
installation of package ‘brms’ had non-zero exit status
ERROR: dependencies ‘classInt’, ‘units’ are not available for package ‘sf’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependencies ‘sp’, ‘spData’, ‘sf’, ‘deldir’, ‘units’, ‘e1071’ are not available for package ‘spdep’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/spdep’
Warning in install.packages :
installation of package ‘spdep’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmptxMyN9/downloaded_packages’
EDIT: If I just do install.package("brms"), I get a similar compilation error:
Installing package into ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘mvtnorm’, ‘bridgesampling’, ‘nleqslv’
trying URL 'https://cloud.r-project.org/src/contrib/mvtnorm_1.1-3.tar.gz'
Content type 'application/x-gzip' length 166421 bytes (162 KB)
==================================================
downloaded 162 KB
trying URL 'https://cloud.r-project.org/src/contrib/bridgesampling_1.1-2.tar.gz'
Content type 'application/x-gzip' length 1679600 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/nleqslv_3.3.2.tar.gz'
Content type 'application/x-gzip' length 83731 bytes (81 KB)
==================================================
downloaded 81 KB
trying URL 'https://cloud.r-project.org/src/contrib/brms_2.17.0.tar.gz'
Content type 'application/x-gzip' length 5679524 bytes (5.4 MB)
==================================================
downloaded 5.4 MB
* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/unsupported" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/BH/include" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/src/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:88,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:1: error: unknown type name ‘namespace’
628 | namespace Eigen {
| ^~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
628 | namespace Eigen {
| ^
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include <complex>
| ^~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: C_FORTRAN_interface.o] Error 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/mvtnorm’
Warning in install.packages :
installation of package ‘mvtnorm’ had non-zero exit status
* installing *source* package ‘nleqslv’ ...
** package ‘nleqslv’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/unsupported" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/BH/include" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/src/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/include/" -I"/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:88,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:1: error: unknown type name ‘namespace’
628 | namespace Eigen {
| ^~~~~~~~~
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/src/Core/util/Macros.h:628:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
628 | namespace Eigen {
| ^
In file included from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Dense:1,
from /home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
from <command-line>:
/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include/Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include <complex>
| ^~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: init.o] Error 1
ERROR: compilation failed for package ‘nleqslv’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/nleqslv’
Warning in install.packages :
installation of package ‘nleqslv’ had non-zero exit status
ERROR: dependency ‘mvtnorm’ is not available for package ‘bridgesampling’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/bridgesampling’
Warning in install.packages :
installation of package ‘bridgesampling’ had non-zero exit status
ERROR: dependencies ‘bridgesampling’, ‘nleqslv’ are not available for package ‘brms’
* removing ‘/home/mdanb/R/x86_64-pc-linux-gnu-library/4.1/brms’
Warning in install.packages :
installation of package ‘brms’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmptxMyN9/downloaded_packages’
CodePudding user response:
As you are (per your comment) on Ubuntu we can help you there. There are two basic ways here which I will describe under 'Basics' and 'Deluxe'
Basics
See the section 'Get 5000 CRAN Packages' in this README at CRAN to install as all of the dependencies of brms
and the package itself that way. In a R-on-Ubuntu-20.04 Docker container I just executed
apt install --no-install-recommends r-cran-brms
(and root
was implicit, else add sudo
) which adds 116 packages -- including brms
itself.
Post if you have questions, either here or on the r-sig-debian list.
Deluxe
Also see several posts on my blog below code/r4 about this -- and in particular
about bspm
. In the Rocker container rocker/r-bspm:20.04
you can just say
install.packages("brms")
in your R session and it will install all packages as binaries relieving you from any and all compilation woes. (I still prefer the shell and call install.r
from littler
but that is just my preference -- it still calls install.packages
.) How to setup the CRAN package bspm
is described in its documentation, or you can just read the Dockerfile
.
Again, if you questions please come to the r-sig-debian list.
Lastly, for the error you report, the suggestion by Robert goes in the right direction: you want break it down package by package and examine the error in the dependent package. brms
pulls is a lot making the binaries really attractive.
CodePudding user response:
Start with
install.package("brms")
To avoid installing packages that you do not need according to your description of your goals. If it turns out that you do need additional packages install them one by one. If you need terra
or sf
and you do not know how to install these, then you can find instructions here or here or elsewhere. And if all fails, you can come back here with a more focused question.