安装R-4.2.0
操作步骤
- 执行以下命令下载R语言源码包。
cd /path/to/R wget https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz
- 执行以下解压安装。
tar xvf R-4.2.0.tar.gz cd R-4.2.0 yum install libXt-devel libX11-devel readline-devel ./configure --prefix=/path/to/R make make install
- 执行以下加载环境变量。
export PATH=/path/to/R/bin:$PATH export LD_LIBRARY_PATH=/path/to/R/lib:$LD_LIBRARY_PATH
- (缺少R语言镜像源时可选)执行以下添加R语言的镜像源。
vim ~/.Rprofile
添加以下内容。options("repos"= c(CRAN="http://mirrors.tuna.tsinghua.edu.cn/CRAN/")) options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/")
父主题: 配置编译环境