2)安装:
解压:
cd /software
tar -zxvf R-3.3.2.tar.gz
mkdir -p /home/liyg/software/R
cd R-3.3.2
./configure --prefix=/home/liyg/software/R --enable-R-shlib
3) 报错和解决方法:./configure --prefix=/home/liyg/software/R --enable-R-shlib
a) 报错如下:
configure:5783: result: no
configure:5846: checking for cc
configure:5893: result: no
configure:5949: checking for cl.exe
configure:5979: result: no
configure:6003: error: in `/software/R-3.3.2':
configure:6005: error: no acceptable C compiler found in $PATH
See `config.log' for more details
解决方法:yum install gcc
b) 报错如下:
checking for fc... no
configure: error: No F77 compiler found
解决方法:yum install gcc-gfortran
c)报错如下:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/software/R-3.3.2':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
解决方法:yum install gcc gcc-c++
d)报错如下:
--with-readline=yes (default) and headers/libs are not available
解决方法:yum install readline-devel
e)报错如下:
–with-x=yes (default) and X11 headers/libs are not available
解决方法:yum install libXt-devel
f)报错如下:
checking for rpc/xdr.h... yes
checking for XDR support... yes
checking for inflateInit2_ in -lz... no
checking whether zlib support suffices... configure: error: zlib library and headers are required
解决方法:yum install zlib-devel
yum -y install bzip2-devel
g)报错如下:zlib版本太低!
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib
library and headers are required
解决方法:下载:http://zlib.NET/zlib-1.2.8.tar.gz
tar xzvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=$HOME/packages
设置环境变量:
export PATH=/software/packages/bin:$PATH
export LD_LIBRARY_PATH=/software/packages/lib:$LD_LIBRARY_PATH
export CFLAGS="-fPIC -I/software/packages/include"
export LDFLAGS="-fPIC -L/software/packages/lib"
h) 报错如下:bzip2 版本太低
checking bzlib.h presence... y
2021-06-21 21:35:13
28.39MB
R-3.2.2
1