rhel6.5 安装R语言

今天在rhel 6.5上用源码安装R语言,遇到了一些问题,记录一下备忘:

Linux RHCE6.5 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

 

1:需要安装的包

gcc  gfortran readline libpng 

由于rhel没有注册,所以不能用redhat官方的yum源头,我就用rpm包的方式安装

wget ftp://rpmfind.net/linux/centos/6.5/os/x86_64/Packages/gcc-gfortran-4.4.7-4.el6.x86_64.rpm

rpm -ivh ftp://rpmfind.net/linux/centos/6.5/os/x86_64/Packages/gcc-gfortran-4.4.7-4.el6.x86_64.rpm 

 

wget ftp://ftp.pbone.net/mirror/archive.download.redhat.com/pub/redhat/linux/6.1/en/os/i386/SRPMS/readline-2.2.1-5.src.rpm
rpm -ivh readline-2.2.1-5.src.rpm

 2:开始安装

./configure --prefix=/opt/r  --with-readline=yes --with-libpng=yes --with-x=no

 如果没有成功安装readline 需要用 --with-readline=no,默认选项是 --with-readline=yes

否则会提示 --with-readline=yes   and headers/libs are not available类似错误

如果没有安装libx,需要使用 --with-x =no 

  make && make install

3:建立软链接

ln -s <YOUR_R_HOME>/bin/R /usr/local/bin/R

 

参考:

Linux安装R记要

 

你可能感兴趣的:(linux,r)