服务器的R4.2.1装不上ggpubr包解决办法
创始人
2025-01-17 21:33:46
0

问题:服务器版RStudio server安装R包ggpubr,总是提示失败。
install.packages("ggpubr")
BiocManager::install('ggpubr')
devtools::install_github("kassambara/ggpubr")
以上安装方法都不成功,提示:
......
gcc -std=gnu11 -shared -L/opt/R/4.2.1/lib/R/lib -L/usr/local/lib -o Matrix.so Csparse.o abIndex.o attrib.o bind.o chm_common.o cholmod-etc.o coerce.o cs.o cs-etc.o dense.o determinant.o dgCMatrix.o dgeMatrix.o factorizations.o idz.o init.o kappa.o objects.o perm.o products.o solve.o sparse.o sparseVector.o subscript.o utils-R.o utils.o validity.o CHOLMOD.a COLAMD.a AMD.a SuiteSparse_config.a -L/opt/R/4.2.1/lib/R/lib -lRlapack -L/opt/R/4.2.1/lib/R/lib -lRblas -lgfortran -lm -lquadmath -L/opt/R/4.2.1/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/opt/R/4.2.1/lib/R/share/make/shlib.mk:10: Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/Matrix’
* installing *source* package ‘SparseM’ ...
** package ‘SparseM’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
......
gcc -std=gnu11 -shared -L/opt/R/4.2.1/lib/R/lib -L/usr/local/lib -o SparseM.so bckslv.o chol.o chol2csr.o cholesky.o csr.o extract.o init.o sparskit.o subscr.o -lgfortran -lm -lquadmath -L/opt/R/4.2.1/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/opt/R/4.2.1/lib/R/share/make/shlib.mk:10: SparseM.so] Error 1
ERROR: compilation failed for package ‘SparseM’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/SparseM’
* installing *source* package ‘MatrixModels’ ...
** package ‘MatrixModels’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘Matrix’ 1.4-1 is being loaded, but >= 1.6.0 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘MatrixModels’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/MatrixModels’
ERROR: dependencies ‘SparseM’, ‘MatrixModels’ are not available for package ‘quantreg’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/quantreg’
ERROR: dependency ‘quantreg’ is not available for package ‘car’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/car’
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/rstatix’
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/home/yang_jg/R/x86_64-pc-linux-gnu-library/4.2/ggpubr’

解决办法:
服务器启动jupyter notebook ,然后使用R4.0.0新建notebook(新建一个xx.ipynb的文件),在里面安装软件包:
备注:jupyter notebook更新R版本请参考:https://cloud.tencent.com/developer/ask/sof/1539811
install.packages("ggplot2")
install.packages("ggpubr") #安装ggpubr和其它的依赖包
library(ggpubr)  #可以正常加载ggpubr包

然后在服务器版RStudio server也可以加载ggpubr包。
偶然发现的,经验总结,2023.12.5

相关内容

热门资讯

透视辅助!wepoker私人局... 透视辅助!wepoker私人局透视教程,原先存在有挂(透视)揭秘攻略(有挂工具)所有人都在同一条线上...
透视ai"wpk有那... 透视ai"wpk有那种辅助吗"真是是有挂(透视)教你攻略(有挂教程);1、wpk有那种辅助吗透视辅助...
透视app!aapoker能控... 透视app!aapoker能控制牌吗(透视)透视脚本下载(切实是真的有挂);所有人都在同一条线上,像...
透视实锤!pokemmo手机脚... 透视实锤!pokemmo手机脚本辅助器,竟然是有挂(透视)2025版教程(有挂教程);1、金币登录送...
透视有挂"hhpok... 透视有挂"hhpoker辅助软件"好像是真的有挂(透视)透视教程(有挂攻略);1、进入到hhpoke...
透视最新!aapoker脚本(... 透视最新!aapoker脚本(透视)透视软件(总是真的有挂);1、构建自己的aapoker脚本辅助插...
透视ai!wepoker永久免... 透视ai!wepoker永久免费脚本,最初是有挂(透视)扑克教程(有挂细节)透视ai!wepoker...
透视辅助"hhpok... 透视辅助"hhpoker怎么破解"真是存在有挂(透视)科技教程(有挂解说)1、点击下载安装,hhpo...
透视讲解!aapoker透视脚... 透视讲解!aapoker透视脚本(透视)免费透视脚本(确实有挂)1、aapoker透视脚本ai辅助优...
透视透视挂!wepoker插件... 透视透视挂!wepoker插件程序激活码,竟然真的是有挂(透视)教你攻略(有挂介绍)1、很好的工具软...