while installing rstan getting following error:
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
from research got to know that C++14 compiler should be available. How to install the same while configuring R. Using the below command to configure R
./configure --with-readline=no --with-x=no
and installing
yum install -y devtoolset-6
but still not able to update C++14 and rstan gives the error
Default C++ compiler: g++ -g -O2
C++98 compiler: g++ -g -O2
C++11 compiler: g++ -std=gnu++11 -g -O2
C++14 compiler: g++ -g -O2
C++17 compiler:
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
setup.sh
yum -y update
yum install -y centos-release-scl
yum install -y devtoolset-6
yum install -y devtoolset-6-gcc-gfortran
scl enable devtoolset-6 bash
scl enable devtoolset-6-gcc-gfortran bash
mkdir packages
cd packages
wget -qO-
https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-
1.2.8.tar.gz | tar zvx
cd zlib-1.2.8
./configure
make
make install
cd ..
wget -qO- http://downloads.sourceforge.net/pcre/pcre-8.35.tar.gz |
tar xzv
cd pcre-8.35
./configure
make
make install
cd ..
wget -qO- http://tukaani.org/xz/xz-5.2.2.tar.gz | tar xzv
cd xz-5.2.2
./configure
make
make install
cd ..
wget -qO- https://curl.haxx.se/download/curl-7.47.1.tar.gz | tar xzv
cd curl-7.47.1
./configure
make
make install
cd ..
wget -qO- https://cran.r-project.org/src/base/R-3/R-3.4.4.tar.gz |
tar xzv
cd R-3.4.4
./configure --with-readline=no --with-x=no --prefix=/packages/R-3.4.4
F77=gfortran
make
make install