一、源码安装
1、下载R 安装包
R-3.0.3.tar.gz https://cran.r-project.org/src/base/R-3/R-3.0.3.tar.gz
\
2、解压
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
5)./configure 报错
whether bzip2 support suffices... configure: error: bzip2 library and headers are required
解决办法
yum search bzip2 //查询安装包
然后再安装
yum -y install bzip2-devel.x86_64
6)./configure 报错
configure: error: "liblzma library and headers are required"
解决办法
yum search liblzma
然后再安装
yum install xz-devel.x86_64
7)./configure 报错
yum search pcre
然后安装pcre
最后再运行./configure就成功了
环境配置完毕后,可以进行make和安装
make & make install
配置I5的话 大概是15到20分钟。就成功了
再在控制台输入R命令,就显示了