• Welcome to LiuJason's Blog!

[已解决]ERROR: dependencies * are not available for package *|installation of package * had non-zero exit status

Linux笔记 Jason 3 years ago (2018-11-29) 1436 Views 0 Comments QR code of this page

[问题]
Rstudio-Server 在安装一些程序包的时候经常会出现这种错误

ERROR: dependencies ‘jpeg’, ‘png’ are not available for package ‘qgraph’
* removing ‘/home/liujason/R/x86_64-redhat-linux-gnu-library/3.5/qgraph’
Warning in install.packages :
  installation of package ‘qgraph’ had non-zero exit status
ERROR: dependency ‘rio’ is not available for package ‘car’
* removing ‘/home/liujason/R/x86_64-redhat-linux-gnu-library/3.5/car’
Warning in install.packages :
  installation of package ‘car’ had non-zero exit status
ERROR: dependencies ‘git2r’, ‘httr’, ‘usethis’ are not available for package ‘devtools’
* removing ‘/home/liujason/R/x86_64-redhat-linux-gnu-library/3.5/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status
ERROR: dependencies ‘qgraph’, ‘XML’ are not available for package ‘semPlot’
* removing ‘/home/liujason/R/x86_64-redhat-linux-gnu-library/3.5/semPlot’
Warning in install.packages :
  installation of package ‘semPlot’ had non-zero exit status

这种问题一般来说都是因为权限不足导致的,毕竟Rstudio-Server不允许root用户登录,但是有时候一些依赖包有需要root权限才能正常安装Orz
毕竟还是安全第一,如果Rstudio-Server的权限是root那岂不是可以为所欲为!

[解决方案]
其实没啥好说的,用root账户ssh到服务器安装缺少的依赖包就好了:

sudo yum install libjpeg-turbo-devel libpng-devel libxml2-dev openssl -y

 


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/133.html
Like (3)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址