Trouble installing rstan

rstan

#1

I have trouble installing rstan on the following system:

  • Operating System: Red Hat 7.5
  • R Version: 3.5.1

Below is the error message:

  • installing source package ‘rstan’ …
    ** package ‘rstan’ successfully unpacked and MD5 sums checked
    ** libs
    Error in .shlib_internal(args) :
    C++14 standard requested but CXX14 is not defined
  • removing ‘/home/gangchen/R/x86_64-redhat-linux-gnu-library/3.5/rstan’
    ERROR: dependency ‘rstan’ is not available for package ‘shinystan’
  • removing ‘/home/gangchen/R/x86_64-redhat-linux-gnu-library/3.5/shinystan’
    ERROR: dependencies ‘rstan’, ‘shinystan’ are not available for package ‘brms’
  • removing ‘/home/gangchen/R/x86_64-redhat-linux-gnu-library/3.5/brms’

How to fix it?


#2

You need to see a compiler that is more recent than the default g++-8. This can be obtained from the Red Hat Developer Toolset. You may also have to tell it what compiler to use for the C++14 standard. See


Rstan installation on RHEL 6
How to fix this compilation error?