Install R-3.3.1 source code, r-3.3.1 source code
1. yum install readline-devel
2. yum install libXt-devel
3. tar zxvf R-3.3.1.tar.gz
Cd R-3.3.1
./Configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib
Error:
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 # zlib or zlib is missing
4. Install zlib
Tar xvf zlib-1.2.8.tar.gz
Tar xvf zlib-1.2.8.tar.gz
Cd zlib-1.2.8
./Configure -- prefix =/opt/zlib-1.2.8
Make & make install
5, cd/root/R-3.3.1
./Configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib LDFLAGS = "-L/opt/zlib-1.2.8/lib" CPPFLAGS = "-I/opt/zlib-1.2.8/include"
Error:
Checking for zlib. h... yes
Checking if zlib version> = 1.2.5... yes
Checking whether zlib support suffices... yes
Checking mmap support for zlib... yes
Checking for BZ2_bzlibVersion in-lbz2. .. no
Checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required # the zlib version already meets the requirements and lacks bzip2.
6. Install bzip2
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
7 ,. /configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib LDFLAGS = "-L/opt/zlib-1.2.8/lib-L/opt/bzip2-1.0.6/lib" CPPFLAGS = "-I /opt/zlib-1.2.8/include-I/opt/bzip2-1.0.6/include"
Error:
Checking if bzip2 version> = 1.0.6... yes
Checking whether bzip2 support suffices... no
Checking for lzma_version_number in-llzma... no # bzip2 meets the requirements, but lzma (xz Software Package) is missing
8. Install xz
Tar zxvf xz-5.2.2.tar.gz
Cd/root/xz-5.2.2
./Configure -- prefix =/opt/xz-5.2.2
Make-j3
Make install
9 ,. /configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib LDFLAGS = "-L/opt/zlib-1.2.8/lib-L/opt/bzip2-1.0.6/lib-L/opt/xz-5.2.2 /lib "CPPFLAGS ="-I/opt/zlib-1.2.8/include-I/opt/bzip2-1.0.6/include-I/opt/xz-5.2.2/include"
Error:
Checking whether bzip2 support suffices... no
Checking for lzma_version_number in-llzma... yes
Checking lzma. h usability... yes
Checking lzma. h presence... yes
Checking for lzma. h... yes
Checking if lzma version> = 5.0.3... yes
Checking for pcre_fullinfo in-lpcre... no
Checking whether PCRE support suffices... configure: error: pcre> = 8.10 library and headers are required # The xz version meets the requirements. The prce version is too low or missing
10. Install pcre
Tar zxvf pcre-8.39.tar.gz
Cd/root/pcre-8.39
./Configure -- prefix =/opt/pcre-8.39
Make-j3 & make install
11 ,. /configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib 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 "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"
Error:
Checking for pcre. h... yes
Checking pcre/pcre. h usability... no
Checking pcre/pcre. h presence... no
Checking for pcre/pcre. h... no
Checking if PCRE version> = 8.10, <10.0 and has UTF-8 support... no
Checking whether PCRE support suffices... configure: error: pcre> = 8.10 library and headers are required # PCRE needs to be installed -- enable-utf8
12. reinstall pcre.
Rm-rf/opt/pcre-8.39
Cd/root/pcre-8.39
./Configure -- prefix =/opt/pcre-8.39 -- enable-utf8
Make-j3 & make install
13 ,. /configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib 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 "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 /"
Error:
Checking pcre/pcre. h usability... no
Checking pcre/pcre. h presence... no
Checking for pcre/pcre. h... no
Checking if PCRE version> = 8.10, <10.0 and has UTF-8 support... yes
Checking if PCRE version> = 8. 32... yes
Checking whether PCRE support suffices... yes
Checking for curl-config... no
Checking curl/curl. h usability... no
Checking curl/curl. h presence... no
Checking for curl/curl. h... no
Configure: error: libcurl> = 7.28.0 library and headers are required with support for https # Install curl
14. Install curl
Tar zxvf curl-7.50.1.tar.gz
Cd/root/curl-7.50.1
./Configure -- prefix =/opt/curl-7.50.1
Make & make install
15 ,. /configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib 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.50.1/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.50.1/include"
Error:
Checking curl/curl. h usability... yes
Checking curl/curl. h presence... yes
Checking for curl/curl. h... yes
Checking if libcurl is version 7 and> = 7.28.0... yes
Checking if libcurl supports https... no
Configure: error: libcurl> = 7.28.0 library and headers are required with support for https # This is a big pitfall. Add the bin path of curl to the environment variable. If no error is reported, it must have been caused by the curl installed by the system by default.
Eliminate potential risks. If any error is reported, perform the following operations. Retain the curl installed by default to prevent missing system program dependencies.
16. Final operation
. /Configure -- prefix =/opt/R-3.3.1 -- enable-R-shlib 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.50.1/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.50.1/include"
Vim/etc/profile
Export PATH = $ PATH: $ JAVA_HOME/bin:/opt/curl-7.50.1/bin # Add ":/opt/curl-7.50.1/bin" to this line"
Source/etc/profile # immediately bring environment variables into effect
Verification;
Echo $ PATH
/Usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin: /root/bin:/opt/java/jdk1.8.0 _ 74/bin:/opt/curl-7.50.1/bin
Make
Make install
Vim/etc/profile # Add the R source environment variable
Export PATH = $ PATH: $ JAVA_HOME/bin:/opt/curl-7.50.1/bin:/opt/R-3.3.1/bin
Source/etc/profile # immediately bring environment variables into effect
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger. Http://blog.csdn.net/kwame211/article/details/78894966