centos服务器怎么安装R语言环境?我大概找了下网上的教程,发现都是直接yum啥的安装,也没个具体教程、也都不是很靠谱,也没个具体版本啥的,今天我来给大家讲一下固定版本安装是怎么安装的!
一、下载R语言安装包
我这里已经下载好了,R-3.6.3.tar.gz,(百度自行下载就好)就拿这个版本来举例
二、解压到固定目录下
解压命令:
tar -zxvf R-3.6.3.tar.gz三、安装各种依赖包(直接复制粘贴回车安装即可)
yum install -y gccyum install -y gcc-gfortranyum install -y gcc-c++yum install -y glibc-headersyum install -y libreadline6-dev gfortran yum install -y readline-develyum install -y wget libXt-develyum install -y fonts-chinese tcl tcl-devel tclx tk tk-develyum install -y mesa-libGLU mesa-libGLU-develyum install -y install bzip2-devel yum install -y install xz-devel.x86_64 yum install -y install pcre-develyum install -y install libcurlyum install -y install libcurl-develyum install -y texinfo.x86_64yum install -y texlive-pdftex-doc.noarchyum install -y texliveyum install -y xorg-x11-server-Xvfbyum install -y xorg-x11-fonts-75dpiyum install -y xorg-x11-fonts-100dpiyum install -y libXtst-develyum install -y libssh2-develyum install -y libgit2-devel注:如果用不了yum的话可以直接去下载 :如:gcc的包, rpm -ivh 包名.rpm回车安装
四、运行安装
进到解压出来的文件夹内
./configure --enable-R-shlib=yes --with-tcltk --prefix=/94ipcom/R-3.6.3 //(路径别搞错)
make //这步回车后安装会比较慢,耐心等候make install五、编辑变量
vim ~/.bashrcR_HOME=/94ipcom/R-3.6.3 //(路径别搞错)PATH=$PATH:$R_HOME/binsource ~/.bashrc //使变量设置生效六、测试成功
输入:R回车即可看到反馈方为成功!
|