Am using R 3.5 version, while am trying to install the lubridate package in rstudio its throws an error as follows
install.packages("lubridate")
Installing package into ‘/home/Arun/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.7.4.tar.gz'Content type 'application/x-gzip' length 449850 bytes (439 KB)
downloaded 439 KB
The downloaded source packages are in
‘/tmp/RtmpSIz8vF/downloaded_packages’
Kindly someone help to resolve this problem
thanks in advance
Same here I am not able to install it on debian:stretch
You need newer version of gcc (4.8.0, better 4.9.0). There are several issues on this tracker with similar problem. Some of them have concrete (admittedly technical) directions.
You could also install an old version. Tested on my CentOS 6.9:
wget https://github.com/tidyverse/lubridate/archive/v1.6.0.tar.gz
sudo R CMD INSTALL v1.6.0.tar.gz
I tried the below command and its working fine
wget https://github.com/tidyverse/lubridate/archive/v1.6.0.tar.gz
sudo R CMD INSTALL v1.6.0.tar.gz
Here is what I do on CentOS 6.9 in order to install the latest version of lubridate which requires a gcc version later than what comes with CentOS 6.9.
Install devtoolset-3
sudo yum install centos-release-scl-rh
sudo yum install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-gcc-gfortran
Start a new bash shell with devtoolset-3 enabled (because the above steps do not replace the default gcc)
scl enable devtoolset-3 bash
From that shell, run your R code again and the lubridate package will be successfully downloaded and compiled to your library.
When you return to your normal shell, without the devtoolset-3 enabled, you will still be able to run your R code because the package will already be compiled, as long as you are using the same library directory.
Most helpful comment
Here is what I do on CentOS 6.9 in order to install the latest version of lubridate which requires a gcc version later than what comes with CentOS 6.9.
Install devtoolset-3
sudo yum install centos-release-scl-rh
sudo yum install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-gcc-gfortran
Start a new bash shell with devtoolset-3 enabled (because the above steps do not replace the default gcc)
scl enable devtoolset-3 bash
From that shell, run your R code again and the lubridate package will be successfully downloaded and compiled to your library.
When you return to your normal shell, without the devtoolset-3 enabled, you will still be able to run your R code because the package will already be compiled, as long as you are using the same library directory.