title: Rstudio-server 更改R版本 tags: [] id: '1680' categories:
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh
./Miniconda3-py39_4.11.0-Linux-x86_64.sh
source ~/.bashrc
conda install -c conda-forge nano=2.9.8 -y
nano -K .condarc
conda clean -i
添加清华镜像:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
conda create -n r_4_1_3 -c conda-forge r-base=4.1.3 -y
conda activate r_4_1_3
whereis R
# /home/rstudio/miniconda3/envs/r_4_1_3/bin/R
docker exec -it Rstudio /bin/bash
chmod 777 -R /etc/rstudio/
exit
nano -K /etc/rstudio/rserver.conf
# Server Configuration File
rsession-which-r=/home/rstudio/miniconda3/envs/r_4_1_3/bin/R
docker restart Rstudio