RStudio在Ubuntu上安装的一些问题
最近我在Ubuntu上安装R和RStudio,R我是使用asdf去安装的,而RStudio是直接下载包使用 dpkg -i rstudio-2022.07.0-548-amd64.deb
安装的。
R安装过程中会遇到一些少系统包,挨个进行apt install 即可,中间会有一个问题就是提示curl版本太低,实际系统可能是高版本,这个时候重新刷一遍即可:
sudo apt-get install libcurl4-openssl-dev |
在安装完成后,启动rstudio的时候碰到一些问题:
Path to R not specified, and no module binary specified; Invalid R module () |
我是asdf安装的,是通过~/.tool-versions去解析的,所以我感觉是默认path没有找到,因此我做了软链:
sudo ln -s /home/fcbai/.asdf/shims/R /usr/local/bin/R |
然后启动的时候又出现:
ERROR Unable to find libR.so in expected locations within R Home directory |
我看了下编译后的地址确实没有这个so,所以感觉是编译问题,于是修改了asdf中r的编译脚本:
vi ~/.asdf/plugins/R/bin/install |
将 construct_configure_options()最后一句改为: echo “$configure_options –enable-R-shlib”。
然后卸载R重新使用asdf安装,就能正常使用了。
扫码手机观看或分享: