参考:
http://blog.sina.com.cn/s/blog_6caea8bf0100zfbu.html
1、解压文件:tar –zvxf R-2.13.2.tar.gz
2、进入R源文件目录:cd R-2.13.2
3、执行./configure命令,提示错误信息为“configure: error: No F77 compiler found”,这个错误是因为没有安装fortran编译器。执行命令zypper se fortran。找到相应的软件源再zypper in 它。再次执行./configure,报错:“configure: error: --with-readline=yes (default) and headers/libs are not available”,执行命令./configure --with-readline=no,继续报错:“configure: error: –with-x=yes (default) and X11 headers/libs are not available”。尝试执行命令./configure --with-readline=no --with-x=no通过,只是会提示警告信息:
configure: WARNING: you cannot build DVI versions of the R manuals
configure: WARNING: you cannot build DVI versions of all the help pages
configure: WARNING: you cannot build info or HTML versions of the R manuals
configure: WARNING: you cannot build PDF versions of the R manuals
configure: WARNING: you cannot build PDF versions of all the help pages
4、make
5、make install
(以下未测试)
安装成功。进入R命令行界面,可以操作。但是tab自动补全以及上下左右等方向键都无法使用。想着应该是./configure --with-readline=no --with-x=no惹的祸。因此重新安装了一下,这次在执行./configure命令前先执行了命令:
yum install readline-devel(解决错误“ --with-readline=yes (default) and headers/libs are not available”)
yum install libXt-devel(解决错误“–with-x=yes (default) and X11 headers/libs are not available”)
最终安装成功,并且tab自动补全等都有效。