码迷,mamicode.com
首页 > 其他好文 > 详细

R安装部署

时间:2016-12-09 22:27:16      阅读:582      评论:0      收藏:0      [点我收藏+]

标签:r

1、yum install -y  readline-devel  gcc*  libXt-devel   openssl*
2、下载编译安装zlib
   wget http://ncu.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
   tar -zxvf zlib-1.2.8.tar.gz
   cd zlib-1.2.8
   ./configure --prefix=/opt/zlib-1.2.8
   make && make install
    在/etc/profile文件中添加:
    LIBRARY_PATH=/usr/local/zlib/lib/:$LIBRARY_PATH
    export  LIBRARY_PATH
    LD_LIBRARY_PATH=/usr/local/zlib/lib/:$LD_LIBRARY_PATH
    export  LD_LIBRARY_PATH
    C_INCLUDE_PATH=/usr/local/zlib/include/:$C_INCLUDE_PATH
    export C_INCLUDE_PATH
3、下载编译安装bzip2
   wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
   tar -zxvf bzip2-1.0.6.tar.gz
   cd bzip2-1.0.6
   make -f Makefile-libbz2_so
   make clean
   make
   make install PREFIX=/opt/bzip2-1.0.6
   在/etc/profile文件中添加: export PATH=/opt/bzip2-1.0.6/bin:$PATH
4、下载编译安装xz
   wget http://tukaani.org/xz/xz-5.2.2.tar.gz
   tar xzvf xz-5.2.2.tar.gz
   cd xz-5.2.2
   ./configure --prefix=/opt/xz-5.2.2
   make -j3 & make install
5、下载编译安装pcre
   wget http://fossies.org/linux/misc/pcre-8.39.tar.gz
   tar -zxvf pcre-8.39.tar.gz
   cd pcre-8.39
   ./configure --prefix=/opt/pcre-8.39 --enable-utf8
   make & make instal
6、下载编译安装curl
   wget https://curl.haxx.se/download/curl-7.51.0.tar.gz
   tar zxvf curl-7.51.0.tar.gz
   cd curl-7.51.0
   ./configure --prefix=/opt/curl-7.51.0
   make && make install
   
   export PATH=/opt/curl-7.51.0/bin:$PATH
   export PATH=/opt/R/bin:$PATH
   source /etc/profile

7、更新链接lib库和PATH路径
    echo /opt/xz-5.2.2/lib >> /etc/ld.so.conf
    echo /opt/pcre-8.39/lib >> /etc/ld.so.conf
    echo "export LD_LIBRARY_PATH=/opt/curl-7.51.0/lib:$LD_LIBRARY_PATH">> /root/.bashrc
    source /root/.bashrc
    
8、安装R程序
    wget  https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/base/R-3/R-3.3.2.tar.gz
    tar -zxvf R-3.3.1.tar.gz
    cd R-3.3.1
    ./configure --enable-R-shlib --prefix=/opt/R --with-x=no   LDFLAGS="-L/opt/zlib-1.2.8/lib -L/opt/bzip2-1.0.6/lib -L/opt/xz-5.2.2/lib  -L/opt/pcre-8.39/lib -L/opt/curl-7.51.0/lib" CPPFLAGS="-I/opt/zlib-1.2.8/include -I/opt/bzip2-1.0.6/include -I/opt/xz-5.2.2/include -I/opt/pcre-8.39/include -I/opt/curl-7.51.0/include"
    ldconfig
    mv  /opt/bzip2-1.0.6/lib/libbz2.a   /tmp
    make
    mv  /tmp/libbz2.a                  /opt/bzip2-1.0.6/lib
    make     install

本文出自 “jiazheming” 博客,请务必保留此出处http://8888866666.blog.51cto.com/6988153/1881310

R安装部署

标签:r

原文地址:http://8888866666.blog.51cto.com/6988153/1881310

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!