ubuntu源码安装R语言

  

下载后解压完,进入开始配置:

./configure --enable-R-shlib

报错:

configure: error: con--with-readline=yes (default) and headers/libs are not available

然后需要安装依赖的readline:

sudo apt-get install libreadline-dev
sudo apt-get install readline-common

重新configure会报错:

configure: error: --with-x=yes (default) and X11 headers/libs are not available
sudo apt-get install libxt-dev

 

再来一个PDF相关的,不然会有警告:

sudo apt-get install texinfo
sudo apt-get install texlive

然后使用下面的命令安装:

./configure --prefix=/opt/R-3.x.x --enable-R-shlib

--prefix是说安装到的目录

成功后会显示:

R is now configured for x86_64-unknown-linux-gnu

  Source directory:          .
  Installation directory:    /opt/R-3.2.0

  C compiler:                gcc -std=gnu99  -g -O2
  Fortran 77 compiler:       gfortran  -g -O2

  C++ compiler:              g++  -g -O2
  C++ 11 compiler:           g++  -std=c++11 -g -O2
  Fortran 90/95 compiler:    gfortran -g -O2
  Obj-C compiler:          

  Interfaces supported:      X11
  External libraries:        readline
  Additional capabilities:   NLS
  Options enabled:           shared R library, shared BLAS, R profiling

  Capabilities skipped:      PNG, JPEG, TIFF, cairo, ICU
  Options not enabled:       memory profiling

  Recommended packages:      yes

configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally

 

 make  make install 就OK

 

如果安装Rstudio Server:

Centos参见这篇文章:http://blog.supstat.com/cn/2014/04/11/install-rstudio-server-on-centos/

里面有一个rpm失效了,找到一个可用的是:

wget ftp.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/compat-libgfortran-41-4.1.2-39.el6.x86_64.rpm

 

ubuntu安装Rstudio Server,参见张丹的博客:

 http://blog.fens.me/r-rstudio-server/

 

 

 

http://bbs.pinggu.org/thread-3253312-1-1.html

http://blog.csdn.net/lichangzai/article/details/39272469

posted @ 2015-06-04 17:01  大树的博客  Views(2451)  Comments(0Edit  收藏  举报