Centos 6 7 8 安装R语言

安装方法一(下载安装;繁琐):

 

1 下载R源代码

原码下载地址
https://cloud.r-project.org/
https://cloud.r-project.org/src/base/R-3/R-3.4.2.tar.gz

2 安装编译环境

yum -y install gcc
yum install glibc-headers
yum install gcc-c++
yum install gcc-gfortran
yum install readline-devel
yum install libXt-devel
yum -y install bzip2-devel


3 安装
在下载的解压文件夹中
./configure(./configure --prefix=指定路径/R --enable-R-shlib #设置工作路径)

cd 解压文件夹中
mkdir /home/aimin/software/R/
./configure --prefix=/home/aimin/software/R/ --enable-R-shlib

 

# 注意 configure 过程中如果有错误,会给出错误的提示,缺少什么就安装什么;

# 例如: configure: error: zlib library and headers are required
# yum -y install bzip2-devel

#  REF: https://unix.stackexchange.com/questions/343452/how-to-install-r-3-3-1-in-my-own-directory


make    ## Error: No targets specified and no makefile found
make install

 

4 测试

R

 

Linux下R环境安装

https://www.cnblogs.com/klb561/p/10822399.html

 

安装方法二(yum简单):

 

yum在线安装

1.通过如下命令安装并启用 EPEL (如果已经安装过,直接执行第二步)

yum install epel-release

2.使用如下命令安装R

yum install R

3.安装完成之后,直接在终端输入R然后回车之后出现类似如下内容则表示安装成功

[root]# R

posted @ 2017-11-14 23:52  emanlee  阅读(2489)  评论(0编辑  收藏  举报