• Compiling R-3.4.3 on CentOS 6.10 with GNU


    If you are compiling CentOS 6, you will notice that the R source will not compile without a updated version of zlib, pcre, bzip2. libcurl. There is a very good site on how to compile R on Red Hat Linux

    Step 1: Compile R-3.4.3

    Download R-3.4.2 from The R Project for Statistical Computing

    $ tar -zxvf R-3.4.2.tar.gz
    $ ./configure --prefix=/usr/local/RH6_apps/R-3.4.3
    

    During configuring…. error surfaced.

    checking for zlib.h... yes
    checking if zlib version >= 1.2.5... no
    checking whether zlib support suffices... configure: error: zlib library and headers are required
    

    Step 2: Compile zlib 1.2.11

    a. In your .bashrc

    export CFLAGS="-I/usr/local/zlib-1.2.11/include"
    export LDFLAGS="-L/usr/local/zlib-1.2.11/lib"
    

    b. Compile zlib-1.2.11

    $ wget http://zlib.net/zlib-1.2.11.tar.gz
    $ tar -zxvf zlib-1.2.11
    $ cd zlib-1.2.11
    $ configure --prefix=/usr/local/zlib-1.2.11
    

    Step 3: Compile bzip2
    a. Download the bzip2

    $wget https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz
    $make -f Makefile-libbz2_so $ make clean $ make -n install PREFIX=/usr/local/bzip2-1.0.6 $ make install PREFIX=/usr/local/bzip2-1.0.6

    Step 4: Compile liblzma or xz

    $ wget http://tukaani.org/xz/xz-5.2.3.tar.gz --no-check-certificate
    $ tar xzvf xz-5.2.3.tar.gz
    $ cd xz-5.2.3
    $ ./configure --prefix=/usr/local/xz-5.2.3
    $ make -j8
    $ make install
    

    Step 5: Compile pcre-8.40

    $ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
    $ tar xzvf pcre-8.40.tar.gz
    $ ./configure --prefix=/usr/local/pcre-8.40
    $ make -j 8
    $ make install
    

    Step 6: Compile libcurl-7.47.1

    $ wget  https://curl.haxx.se/download/curl-7.47.1.tar.gz --no-check-certificate
    $ tar xzvf curl-7.47.1.tar.gz
    $ cd curl-7.47.1
    $ ./configure --prefix=/usr/local/curl-7.47.1
    $ make -j 8
    $ make install
    

    Step 7: Update CFLAGS and LDFLAGS

    export CFLAGS="-I/usr/local/zlib-1.2.11/include -I/usr/local/bzip2-1.0.6/include -I/usr/local/xz-5.2.3/include -I/usr/local/pcre-8.40/include -I/usr/local/curl-7.47.1/include/curl"
    export LDFLAGS="-L/usr/local/zlib-1.2.11/lib -L/usr/local/bzip2-1.0.6/lib -L/usr/local/xz-5.2.3/lib -L/usr/local/pcre-8.40/lib -L/usr/local/curl-7.47.1/lib"
    

    Step 8: Compile R-3.4.3

    $ ./configure --enable-utf8 --prefix=/usr/local/R-3.4.2
    $ make -j 8
    $ make install
    

     



  • 相关阅读:
    简述JavaScript中 同步与异步,阻塞与非阻塞
    浅谈 JavaScript 中 (for循环) 的几种写法及其性能问题
    简述vue下高德地图的一些简单功能的使用(定位,添加marker)
    vuex中mutations与actions的使用及区别
    项目中 vue与高德地图一起使用 (一)
    css3动画,requestAnimationFrame动画与canvas图形
    setTimeout 在 js 加载前的问题探究
    面试答案
    css实现垂直居中的几种常见方法
    align-conten和align-items之间的区别
  • 原文地址:https://www.cnblogs.com/xzlive/p/10277389.html
Copyright © 2020-2023  润新知