###环境变量放前面统一配置

zlib 1.2.5 version

export C_INCLUDE_PATH=/data/zlib/zlib-1.2.5/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/data/zlib/zlib-1.2.5/lib:$LD_LIBRARY_PATH

    # bzip2 1.0.6 version
export C_INCLUDE_PATH=/data/bzip2/bzip2-1.0.6/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/data/bzip2/bzip2-1.0.6/lib:$LD_LIBRARY_PATH
export PATH=/data/bzip2/bzip2-1.0.6/bin:$PATH

    # xz 5.2.4 version
export C_INCLUDE_PATH=/data/xz/xz-5.2.4/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/data/xz/xz-5.2.4/lib:$LD_LIBRARY_PATH
export PATH=/data/xz/xz-5.2.4/bin:$PATH

    # PCRE 8.44 version
export C_INCLUDE_PATH=/data/pcre/pcre-8.44/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/data/pcre/pcre-8.44/lib:$LD_LIBRARY_PATH
export PATH=/data/pcre/pcre-8.44/bin:$PATH

    # curl 7.28.0 version
export C_INCLUDE_PATH=/data/curl/curl-7.28.0/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/data/curl/curl-7.28.0/lib:$LD_LIBRARY_PATH
export PATH=/data/curl/curl-7.28.0/bin:$PATH

export CFLAGS="-fPIC -I/data/bzip2/bzip2-1.0.6/include -I/data/zlib/zlib-1.2.5/include -I/data/xz/xz-5.2.4/include -I/data/pcre/pcre-8.44/include -I/data/curl/curl-7.28.0/include"
export LDFLAGS="-fPIC -L/data/bzip2/bzip2-1.0.6/lib -L/data/zlib/zlib-1.2.5/lib -L/data/xz/xz-5.2.4/lib -L/data/pcre/pcre-8.44/lib -L/data/curl/curl-7.28.0/lib"

安装R语言系统依赖包

yum install gcc-gfortran readline-devel libXt-devel glibc-headers cairo-devel libpng-devel libtiff libjpeg-turbo -y

Install jdk

Configure JAVA_HOME

Error Info: configure: error: No F77 compiler found

yum install gcc-gfortran -y

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

yum install readline-devel -y

Error Info: configure: error: --with-x=yes (default) and X11 headers/libs are not available

yum install libXt-devel -y

Error Info:

checking if zlib version >= 1.2.5... no

checking whether zlib support suffices... configure: error: zlib library and headers are required

zlib version >= 1.2.5 required. Compile install zlib-1.2.11

tar xf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure --prefix=/data/zlib/zlib-1.2.5
make
make install

Error Info:

checking for BZ2_bzlibVersion in -lbz2... no

checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required

bzip2 version >= 1.0.6 required. Compile install bzip2-1.0.6

tar xf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
sed -i 's#CC=gcc#CC=gcc -fPIC#' Makefile
make -f Makefile-libbz2_so 
make
make install PREFIX=/data/bzip2/bzip2-1.0.6
mv libbz2.so.1.0 libbz2.so.1.0.6 /data/bzip2/bzip2-1.0.6/lib/

Error Info:

checking if lzma version >= 5.0.3... no

configure: error: "liblzma library and headers are required"

xz version >= 5.0.3 required. Compile install xz-5.2.4

The offical statement no longer maintains version 5.0

tar xf xz-5.2.4.tar.gz 
cd xz-5.2.4
./configure --prefix=/data/xz/xz-5.2.4
make
make install

Error Info:

checking for pcre_fullinfo in -lpcre... no

checking whether PCRE support suffices... configure: error: pcre >= 8.10 library and headers are required

PCRE version >= 8.10 required. Compile install PCRE-8.44

tar xf pcre-8.44.tar.gz
cd pcre-8.44
./configure --prefix=/data/pcre/pcre-8.44 --enable-utf8
make 
make install

Error Info:

checking for curl/curl.h... no

configure: error: libcurl >= 7.28.0 library and headers are required with support for https

curl version >= 7.28.0 required. Compile install curl-7.28.0

tar xf curl-7.28.0.tar.gz
cd curl-7.28.0
./configure --prefix=/data/curl/curl-7.28.0
make
make install

Install R-3.3.2

tar xf R-3.3.2.tar.gz
cd R-3.3.2
./configure \
--prefix=/data/R/R-3.3.2 \
--bindir=/data/R/R-3.3.2/bin \
--sbindir=/data/R/R-3.3.2/sbin \
--libdir=/data/R/R-3.3.2/lib \
--enable-R-shlib
make
make install

Configure environment:
echo "export PATH=/data/R/R-3.3.2/bin:$PATH" >>/etc/profile
echo "/data/R/R-3.3.2/lib" >>/etc/ld.so.conf.d/R.conf
source /etc/profile
ldconfig