CentOS 7 is an old distro which does not have the new developer tools. In order to install the latest R 4.1.2, I need to install a newer devtoolset.
- Download the scl repo rpms
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm - Install the rpms.
sudo rpm -ivh centos-release-scl-rh-2-3.el7.centos.noarch.rpm
sudo rpm -ivh centos-release-scl-2-3.el7.centos.noarch.rpm - Install scl.
sudo yum install centos-release-scl
- Install devtoolset 7.
sudo yum install devtoolset-7
- Enable devtoolset 7.
sudo scl enable devtoolset-7 bash
- Download R 4.1.2.
wget https://cran.r-project.org/src/base/R-4/R-4.1.2.tar.gz
- Extract R 4.1.2.
tar xvf R-4.1.2.tar.gz
- Change directory to it.
cd R-4.1.2/
- Configure the make environment. The arguments are optional.
./configure --prefix=/share/apps/R-4.1.2 --enable-R-shlib
- Make and install it. This takes a while.
make
make install
This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.
Leave a Reply