centos6.5 安装和卸载R

来源:互联网 发布:外卖人8.6源码下载 编辑:程序博客网 时间:2024/05/16 16:09

原文地址:http://blog.csdn.net/samhuairen/article/details/51334317

在centos6.5上采用非编译的方式安装R的步骤:

su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm' sudo yum update sudo yum install R
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

卸载的方法:

yum list installed | grep RR.x86_64                                  2.15.2-1.el5                 installedR-core.x86_64                             2.15.2-1.el5                 installedR-devel.x86_64                            2.15.2-1.el5                 installedyum remove R.x86_64 yum remove R-core.x86_64
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

这样就能把通过非编译的安装的R完全卸载干净 
采用编译的方式安装R包的方式如下,在编译R之前,需要通过yum安装以下几个程序:

#yum install gcc-gfortran              #否则报”configure: error: No F77 compiler found”错误#yum install gcc gcc-c++              #否则报”configure: error: C++ preprocessor “/lib/cpp” fails sanity check”错误#yum install readline-devel          #否则报”–with-readline=yes (default) and headers/libs are not available”错误#yum install libXt-devel                 #否则报”configure: error: –with-x=yes (default) and X11 headers/libs are not available”错误这里写代码片
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

然后再编译安装

#cd#wget http://ftp.ctex.org/mirrors/CRAN/src/base/R-2/R-2.13.1.tar.gz#tar zxvf R-2.13.1.tar.gz#cd R-2.13.1#./configure#make#make install
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

安装之后,如果普通用户无法打开R的话,就得在R的安装的路径下边,找到R的bin的目录,然后改变执行的权限

chmod 777 /usr/lib64/R/bin
  • 1
  • 1

参考网页:

http://superuser.com/questions/750440/how-do-i-update-r-on-cent-oshttps://www.jason-french.com/blog/2013/03/11/installing-r-in-linux/http://blog.sina.com.cn/s/blog_6caea8bf0100zfbu.htmlhttp://www.dataguru.cn/article-2705-1.htmlhttp://blog.sina.com.cn/s/blog_62b37bfe0102uy9i.html

原创粉丝点击