I am trying to install rstan in Centos.
I am getting the following error:
Error: C++17 standard requested but CXX17 is not defined
My g++ version if relevant is the following:
g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My OS Details:
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core
Running the following does not seem to work:
mkdir -p ~/.R
echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars