配置方式
详见:
https://www.r-bloggers.com/2018/03/multiple-versions-of-r/
问题及解决
第一步,apt源更新
问题:
c compiler cannot create executables
xgcc: error: unrecognized command line option ‘-V’ xgcc: fatal error: no input files
真正的错误并不在这里,而是在最后一个错误出现的地方
首先更新apt源,切记是ubuntu系统匹配的源,不然会安装不上,以及冲突
第二步,安装编译
更新好后,安装build-essential
缺乏breadline
安装R前,建议先安装这些:
sudo apt-get install build-essentialsudo apt-get install fort77sudo apt-get install xorg-devsudo apt-get install liblzma-dev libblas-dev gfortransudo apt-get install gcc-multilibsudo apt-get install gobjc++sudo apt-get install aptitudesudo aptitude install libreadline-dev
bzip2 library and headers are required
sudo apt-get install libbz2-dev
pcre >= 8.20 library and headers are required
apt install libpcre++-dev
libcurl >= 7.22.0 library and headers are required with support for https
apt install libcurl4-openssl-dev
最后,java没有安装
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-20-04
大牛总结的R安装出现的各种问题
https://twilightbbs.wordpress.com/2017/07/04/compiling-cran-r-from-scratch-and-possible-workarounds/
