Installing the R Language
Install the R language on Linux and configure environment variables for the system to recognize R commands, ensuring smooth operation and functionality.
- Download the R language installation package.
1wget http://cran.rstudio.com/src/base/R-3/R-3.1.1.tar.gz - Decompress the package.
1tar -zxf R-3.1.1.tar.gz
- Install dependencies.
1yum -y install bzip2-devel zlib-devel xz-devel pcre-devel libcurl-devel openssl-devel libXt-devel.aarch64 readline-devel.aarch64
- Go to the directory generated after the decompression.
1cd R-3.1.1
- Perform compilation.
1 2
./configure --enable-R-shlib --enable-R-static-lib --with-libpng --with-jpeglib --prefix=/opt/tools/installed/R-3.1.1 make all -j10 && make install
- Configure the R language environment variables.
- Open the /etc/profile file.
vi /etc/profile
- Press i to enter the insert mode and add the following content to the file:
export R_HOME=/opt/tools/installed/R-3.1.1 export PATH=$R_HOME/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/profile file.
- Make the environment variables take effect.
1source /etc/profile
Parent topic: Configuring the Compilation Environment