閱讀屋>休閒雜談> Centos6下安裝R語言教程說明

Centos6下安裝R語言教程說明

Centos6下安裝R語言教程說明

  R語言是主要用於統計分析、繪圖的`語言和操作環境。

  網站:

  http://www.r-project.org/

  Windows下面有直接的安裝包,直接下載安裝很方便,但是對於剛出的CentOS6.0上不能直接透過yum 安裝R,需要自己編譯。

  下載頁面:

  http://ftp.ctex.org/mirrors/CRAN/

  在編譯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

  即可完成編譯安裝。

【Centos6下安裝R語言教程說明】相關文章: