linux安装R-4.1.1


下载源码包并解压

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

# tar zxvf R-4.1.1.tar.gz

# cd R-4.1.1/

配置安装文件

# ./configure --enable-R-shlib --prefix=/path/R/4.1.1

报错:

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.44.tar.gz

# tar zxvf pcre-8.44.tar.gz

# cd pcre-8.44/

# ./configure --enable-utf8

# make && make install

# echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib">>/etc/profile

# source /etc/profile

编译再次报错:

configure: error: libcurl >= 7.28.0 library and headers are required with support for https

查看系统已经安装7.28版本的curl

原因可能是因为安装curl时没有关联ssl

下载符合要求的curl版本

./configure --with-ssl --prefix=/usr/local/curl-7.80

make && make install

export PATH=/usr/local/curl-7.80/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/curl-7.80/lib:$LD_LIBRARY_PATH

安装R4.1.1

# ./configure --enable-R-shlib --prefix=/path/R/4.1.1 --with-pcre1

# make&&make install

 根据用户需求自定义端口、R版本,开启后台服务

su - root -c "module load anaconda3/2020.02;source activate R-4.1.1;nohup /usr/lib/rstudio-server/bin/rserver --server-daemonize=0 --www-port 6089 --rsession-which-r=$(which R) --rsession-ld-library-path=$CONDA_PREFIX/lib &>>/root/rstudio-conda.log &"


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM