1.安装前需要安装
编译器:apt-get install gcc g++ gfortran make
图形设备库:apt-get install libjpeg-dev libtiff-dev libcairo2-dev libicu-dev
2.下载并解压源码文件
curl -OL "https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz"
tar -zx -f R-4.2.0.tar.gz
3.配置
mkdir -p /Pub/Apps/Cellar/R/4.2.0/
cd R-4.2.0
./configure --enable-R-shlib --prefix=/Pub/Apps/Cellar/R/4.2.0/
4.出现的错误及解决方法
configure: error: No Fortran compiler found
解决:apt-get install gfortran
configure: error: --with-readline=yes (default) and headers/libs are not available
解决:apt-get install libreadline-dev
checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required
解决:apt-get install libbz2-dev
configure: error: "liblzma library and headers are required"
解决:apt-get install liblzma-dev
configure: error: libcurl >= 7.28.0 library and headers are required with support for https
解决:apt-get install libcurl4-openssl-dev
5.编译及安装
make -j8
make install
网友评论