美文网首页
在CentOS中安装R-4.0.4

在CentOS中安装R-4.0.4

作者: bioempt | 来源:发表于2021-02-26 15:21 被阅读0次

下载 R-4.0.4

$ wget https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/base/R-4/R-4.0.4.tar.gz

$ tar -zxvf R-4.0.4.tar.gz

配置

$ ./configure --enable-R-shlib=yes --prefix=/disks/software/R-4.0.4

# --enable-R-shlib:将 R 编译成 lib 模式,在此模式下,会生成 path-to-R/lib/libR.so 库

报错

configure: error: PCRE2 library and headers are required, or use --with-pcre1 and PCRE >= 8.32 with UTF-8 support

解决方法:

安装PCRE

$ wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz --no-check-certificate
$ tar -zxvf pcre-8.40.tar.gz
$ cd pcre-8.40
$ ./configure --prefix=/disks/software/pcre-8.4 --enable-utf8
$ make -j3 && make install

再重新配置

$ ./configure --enable-R-shlib=yes --with-pcre1 --prefix=/disks/software/R-4.0.4
# 成功

$ make
$ make install

安装完成

在这里我记录一下各种软件的安装过程,及遇到的问题,并将解决方法分享给有需要的人。如有不妥之处请联系我!

参考:
https://www.yuque.com/shenweiyan/cookbook/install-latest-r-from-source

相关文章

网友评论

      本文标题:在CentOS中安装R-4.0.4

      本文链接:https://www.haomeiwen.com/subject/tnwmfltx.html