一、源码安装
1、下载R 安装包
R-3.0.3.tar.gz http://cran.rstudio.com/src/base/R-3/R-3.0.3.tar.gz
tar xvf R-3.0.3.tar.gz
3、./configure --enable-R-shlib
cd R-3.0.3
./configure --enable-R-shlib
1)./configure 报错
configure: error: No F77 compiler found
解决方法:
yum install gcc-gfortran
2)./configure 报错
configure: error: --with-readline=yes (default) and headers/libs are not available
解决方法:
yum install readline-devel
3)./configure 报错
configure: error: --with-x=yes (default) and X11 headers/libs are not available
解决方法:
yum install libXt-devel
4)./configure 报错
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
解决方法:
yum install gcc-c++ glibc-headers
4、make
5、make install
二、yum安装
1、安装epel yum源 (机器是centos6.3 64bit系统,选择相应版本的epel源)
1)安装
rpm -ivh http://mirror.utexas.edu/epel/6/x86_64/epel-release-6-8.noarch.rpm
2)查看
# rpm -qa|grep epel
epel-release-6-8.noarch
3)导入KEY
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
2、yum 安装R
yum install R
三、rpm 包安装 (只能访问内网yum源,不能访问epel外部源)
http://mirrors.yun-idc.com/epel/6/x86_64/R-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/R-devel-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/R-core-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/R-core-devel-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/R-java-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/R-java-devel-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/libRmath-3.0.2-1.el6.x86_64.rpm
http://mirrors.yun-idc.com/epel/6/x86_64/libRmath-devel-3.0.2-1.el6.x86_64.rpm
1)下载以上rpm包
2)安装rpm包
yum install libRmath-3.0.2-1.el6.x86_64.rpm
yum install libRmath-devel-3.0.2-1.el6.x86_64.rpm
yum install R-core-3.0.2-1.el6.x86_64.rpm
报错Requires: libjpeg.so.62(LIBJPEG_6.2)(64bit)
解决方法:(因为centos6.3 yum安装源中没有libjpeg-turbo)
下载 http://jaist.dl.sourceforge.net/project/libjpeg-turbo/1.2.1/libjpeg-turbo-1.2.1.x86_64.rpm
rpm -ivh libjpeg-turbo-1.2.1.x86_64.rpm
yum install R-core-devel-3.0.2-1.el6.x86_64.rpm
yum install R-java-3.0.2-1.el6.x86_64.rpm
yum install R-java-devel-3.0.2-1.el6.x86_64.rpm
yum install R-3.0.2-1.el6.x86_64.rpm R-devel-3.0.2-1.el6.x86_64.rpm