centos6.5 安装和卸载R

在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

卸载的方法:

yum list installed | grep R
R.x86_64                                  2.15.2-1.el5                 installed
R-core.x86_64                             2.15.2-1.el5                 installed
R-devel.x86_64                            2.15.2-1.el5                 installed
yum remove R.x86_64 
yum remove R-core.x86_64

这样就能把通过非编译的安装的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”错误这里写代码片

然后再编译安装

#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

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

chmod 777 /usr/lib64/R/bin

参考网页:

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

你可能感兴趣的:(r)