CentOS 6 安装R-3.3.2语言支持

走远了吗. 提交于 2020-08-18 09:06:58

安装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
echo "export C_INCLUDE_PATH=/data/zlib/zlib-1.2.5/include:\$C_INCLUDE_PATH" >>/etc/profile
echo "export LD_LIBRARY_PATH=/data/zlib/zlib-1.2.5/lib:\$LD_LIBRARY_PATH" >>/etc/profile
echo 'export CFLAGS="-fPIC -I/data/zlib/zlib-1.2.5/include"' >>/etc/profile
echo 'export LDFLAGS="-fPIC -L/data/zlib/zlib-1.2.5/lib"' >>/etc/profile
source /etc/profile

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/
echo "export C_INCLUDE_PATH=/data/bzip2/bzip2-1.0.6/include:\$C_INCLUDE_PATH" >>/etc/profile
echo "export LD_LIBRARY_PATH=/data/bzip2/bzip2-1.0.6/lib:\$LD_LIBRARY_PATH" >>/etc/profile
echo 'export CFLAGS="-fPIC -I/data/bzip2/bzip2-1.0.6/include"' >>/etc/profile
echo 'export LDFLAGS="-fPIC -L/data/bzip2/bzip2-1.0.6/lib"' >>/etc/profile
echo "export PATH=/data/bzip2/bzip2-1.0.6/bin:\$PATH" >>/etc/profile
source /etc/profile

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
echo "export C_INCLUDE_PATH=/data/xz/xz-5.2.4/include:\$C_INCLUDE_PATH" >>/etc/profile
echo "export LD_LIBRARY_PATH=/data/xz/xz-5.2.4/lib:\$LD_LIBRARY_PATH" >>/etc/profile
echo 'export CFLAGS="-fPIC -I/data/xz/xz-5.2.4/include"' >>/etc/profile
echo 'export LDFLAGS="-fPIC -L/data/xz/xz-5.2.4/lib"' >>/etc/profile
echo "export PATH=/data/xz/xz-5.2.4/bin:\$PATH" >>/etc/profile
source /etc/profile

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

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!