非Root权限-如何在linux上安装R语言?
导语
GUIDE ╲
你是否有过这样的困扰:想使用一个R包,但由于没有root权限而感到束手束脚? 别慌……你只需要用自己的账户重新安装一款R软件,进入到自己目录下的R就可以自由安装R包啦!
| 名称 | 版本 | 下载地址 | |
|---|---|---|---|
| 1 | R | 3.5+版本均可 | https://cran.r-project.org/src/base/R-3/R-3.6.2.tar.gz |
| 2 | bzip2 | >=1.0.6 | https://sourceforge.net/projects/bzip2/files/latest/download |
| 3 | curl | >=7.22.0 | https://curl.haxx.se/download/curl-7.61.0.tar.gzYes |
| 4 | PCRE | >=8.20 & <10 |
https://nchc.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gzYes |
| 5 | xz-lzma | >= 5.0.3 | http://tukaani.org/xz/xz-5.2.3.tar.gz |
| 6 | zlib | >= 1.2.5 | http://zlib.net/zlib-1.2.11.tar.gz |
cd /your/path/wget https://cran.r-project.org/src/base/R-3/R-3.6.2.tar.gztar -xzvf R-3.6.2.tar.gzcd /your/path/R-3.6.2./configure --prefix=/your/path/R --enable-R-shlib --with-readline=yes --with-libpng=yes --with-blasmake -j3make install
configure: error: "liblzma library and headers are required"
wget http://tukaani.org/xz/xz-5.2.3.tar.gztar -xzvf xz-5.2.3.tar.gz=/your/path/xz-5.2.3make -j3make install
checking whether PCRE support suffices... configure: error: pcre >= 8.20 library and headers are required
wget https://nchc.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gztar -zxvf pcre-8.42.tar.gzcd pcre-8.42--enable-utf8 --prefix=/your/path/pcre-8.42 # 一定要设置enable-utf8;make -j3make install
configure: error: libcurl >= 7.22.0 library and headers are required with support for https
wget https://curl.haxx.se/download/curl-7.61.0.tar.gztar -zxvf curl-7.61.0.tar.gzcd curl-7.61.0/--prefix=/your/path/curl-7.61.0makemake install
checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required
tar -xvzf bzip2-1.0.6.tar.gzcd bzip2-1.0.6make -f Makefile-libbz2_so#此时,需要修改Makefile文件#将CC=gcc 改为 CC=gcc -fPICmake clean=/your/path/bzip2-1.0.6
C++11 standard requested but CXX11 is not defined
cd /your/path/R-3.6.0/lib64/R/etc/#修改Makeconf文件参数,如下:#CXX11 = g++#CXX11FLAGS = -O2 -g $(LTO)#CXX11PICFLAGS = -fPIC#CXX11STD =
cd /your/path/R-3.6.2#切记要将刚刚改动的软件lib和include路径给出来,用参数LDFLAGS传递,以bzip2,xz为例./configure --prefix=/your/path/R --enable-R-shlib --with-readline=yes --with-libpng=yes --with-blas LDFLAGS="-L /your/path/bzip2-1.0.6/lib -L /your/path/xz-5.2.2/lib -L /your/path/bzip2-1.0.6/include -L /your/path/xz-5.2.2/include"make -j3#此时手动修改Makeconf文件,在LDFLAGS这里加上-Wl,-rpath后面跟这两个库的路径,#仍然以bzip2,xz为例#LDFLAGS = -L /your/path/bzip2-1.0.6/lib -L /your/path/xz-5.2.2/lib -Wl,-rpath=/your/path/bzip2-1.0.6/lib -Wl,-rpath=/your/path/xz-5.2.2/libmake instal
if (!requireNamespace("BiocManager", quietly = TRUE))install.packages("BiocManager")BiocManager::install("要安装的包")
R CMD INSTALL /.../mypackage.tar.gz --library=/your/lib/path
多区域进化分析
方法类R包
绘图类R包
软件介绍
免疫微环境文献解读
免疫浸润分析
肿瘤纯度评估工具
如有作图分析或编写代码需求,可以后台私信小编。
点击底部的“阅读原文”,直达绘图和项目微店。
