Installing ‘rstan' on CentOS7? the version of gcc is 4.8.5 does not seem to support CXX14

split from Error in .shlib_internal(args) : C++14 standard requested but CXX14 is not defined

Is there anyone who knows how to install the ‘rstan' on CentOS7?
the version of gcc is 4.8.5 which seems not support the CXX14, can I install the package without update the gcc?

No, you cannot, you need more recent gcc. I have the same problem but on RHEL 7. There are three ways I know of to install gcc on older RH:

  • Compile it from source code. This is likely to be extremely painful because I expect newer gcc would want newer libraries (such as libc) and supporting tools as well.
  • Use the Developer Toolset. This is probably the easiest but you need to be careful to make sure it gets activated prior to running R and/or RStudio.
  • Use Nix package manager. This is how I am planning to do it. Nix allows me to add all sorts of newer (versions of) software to older systems, not just gcc. See this chart for how up to date different linux distributions are, the Nix is in the upper right corner. The downside is the learning curve is steep.