- 源码编译
- 步骤
R下载地址:链接: link
步骤// 解压缩
tar xzf R-2.10.1.tar.gz
cd R-2.10.1
//如果需要指定文件夹prefix=/home/op/software/R
./configure --enable-R-shlib
会出错 缺少依赖
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
// 退出R-2.10.1文件夹 然后
sudo apt-get install g++
//继续
cd R-2.10.1
./configure --enable-R-shlib
出错
configure: error: --with-x=yes (default) and X11 headers/libs are not available
// 解决方法
./configure --with-x=no
安装
sudo make
sudo make install
//查看安装版本
R --version
安装完成
参考:https://www.jianshu.com/p/edb234eed915
http://www.bio-info-trainee.com/1307.html
安装旧版本包
//在R中
packageurl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.8.5.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
运行出错
wget http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.8.5.tar.gz
R CMD INSTALL ggplot2_0.8.5.tar.gz
ggplot2包安装成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)