I am trying to install
R library for Facebook’s
prophet on centOS 7. For easy reproducibility, I am providing a
dockerfile and commands.
FROM centos:7 RUN yum -y install epel-release RUN yum -y groupinstall "Development Tools" RUN yum -y install proj RUN yum -y install udunits2-devel RUN yum -y install openssl-devel RUN yum -y install libjpeg-turbo-devel RUN yum -y install libcurl-devel RUN yum -y install v8-devel RUN yum -y install R
To build the dockerfile, use following command.
docker build -t test_prophet_installation .
Once it is built, I run the container using this next command.
docker run -it --entrypoint=/bin/bash test_prophet_installation
Now, I am inside my container. I tried to install
prophet using below command.
su - -c "R -e "install.packages('prophet', repos='http://cran.rstudio.com/')""
The above command said, one of the dependencies of
rstan failed to install. So I tried to install ‘rstan’ using the following command.
su - -c "R -e "install.packages('rstan', repos='http://cran.rstudio.com/')""
After running the above command, I got the following error.
Error in .shlib_internal(args) : C++14 standard requested but CXX14 is not defined * removing '/usr/lib64/R/library/rstan' The downloaded source packages are in '/tmp/RtmpsPDQ9G/downloaded_packages' Updating HTML index of packages in '.Library' Warning messages: 1: In install.packages("rstan", repos = "http://cran.rstudio.com/") : installation of package 'rstan' had non-zero exit status 2: In file.create(f.tg) : cannot create file '/usr/share/doc/R-3.6.0/html/packages.html', reason 'No such file or directory' 3: In make.packages.html(.Library) : cannot update HTML package index
I tried almost all the troubleshooting from Google to solve above error still no luck. I think, I am not setting some environment variable correctly.
Source: Docker Questions