服务器的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

相关内容

热门资讯

推荐攻略!德扑网上设置(透视)... 推荐攻略!德扑网上设置(透视)其实是有挂的(2024已更新)(哔哩哔哩)是一款可以让一直输的玩家,快...
四分钟数据!wpk线上德州俱乐... 四分钟数据!wpk线上德州俱乐部助手,wpk到底有外挂数据(2022已更新)-哔哩哔哩;超受欢迎的w...
分享个大家!pokermast... 分享个大家!pokermaster有挂,牌乐门打盾包赢,有挂爆料(2022已更新)(哔哩哔哩)是一款...
七分钟玄学!微扑克发牌规律性总... 您好,微扑克wpk这款游戏可以开挂的,确实是有挂的,需要了解加微【485275054】很多玩家在这款...
玩家必看科普!wpk微扑克模拟... 《wpk微扑克软件透明挂》是一款多人竞技的wpk微扑克辅助透视游戏,你将微扑克对手来到同一个战场,为...
二个盈利!aapoker是软件... 二个盈利!aapoker是软件助手,aapoker有外挂盈利(2023已更新)-哔哩哔哩是一款可以让...
玩家攻略!微扑克发牌机制(透视... 玩家攻略!微扑克发牌机制(透视)原来是真的有挂(2024已更新)(哔哩哔哩);致您一封信;亲爱微扑克...
三个神器!来玩德州辅助器,wp... 三个神器!来玩德州辅助器,wpk辅助器安装,实用技巧(2024已更新)-哔哩哔哩是一款可以让一直输的...
终于清楚!德州nzt实战,熊猫... 终于清楚!德州nzt实战,熊猫联盟有挂,有挂经验(2020已更新)(哔哩哔哩);1、这是跨平台的熊猫...
一分钟了解!aapoker插件... 大家肯定在之前aapoker或者aapoker中玩过一分钟了解!aapoker插件(透视)原来确实真...