在 R 中安装插入符号包时的依赖性问题 [英] Dependency issue while installing caret package in R

查看:53
本文介绍了在 R 中安装插入符号包时的依赖性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 R 包 caret

I am trying to install R package caret

这给了我错误:依赖项‘ggplot2’、‘reshape2’、‘BradleyTerry2’不可用于包‘caret’

我尝试单独安装每一个,这再次显示安装正在进行,以安装包'X'的退出状态为非零

I tried to install each of this individually, which again shows installation going on, ending with message that installation of package ‘X’ had non-zero exit status

1: In install.packages("caret") :
  installation of package ‘minqa’ had non-zero exit status
2: In install.packages("caret") :
  installation of package ‘RcppEigen’ had non-zero exit status
3: In install.packages("caret") :
  installation of package ‘scales’ had non-zero exit status
4: In install.packages("caret") :
  installation of package ‘reshape2’ had non-zero exit status
5: In install.packages("caret") :
  installation of package ‘lme4’ had non-zero exit status
6: In install.packages("caret") :
  installation of package ‘ggplot2’ had non-zero exit status
7: In install.packages("caret") :
  installation of package ‘BradleyTerry2’ had non-zero exit status
8: In install.packages("caret") :
  installation of package ‘caret’ had non-zero exit status

递归请求安装一些包.有什么问题?

Ask recursively to install some package. What is the issue?

我有旧版本,在那里我遇到了类似的错误.我删除并安装了最新版本.当前版本是R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet",但仍然收到类似的错误信息

I had older version, where I was getting similar error. I removed and installed latest. Currently version is R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet", but still getting similar error message

更新

开始于:install.packages('caret', repos='http://cran.rstudio.com/') 显示消息:

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘minqa’, ‘RcppEigen’, ‘scales’, ‘lme4’, ‘ggplot2’, ‘reshape2’, ‘BradleyTerry2’

过程结束于:

installing to /usr/local/lib/R/site-library/reshape2/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : package ‘stringr’ was built before R 3.0.0: please re-install it
ERROR: lazy loading failed for package ‘reshape2’
* removing ‘/usr/local/lib/R/site-library/reshape2’
ERROR: dependencies ‘minqa’, ‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’
ERROR: dependencies ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/usr/local/lib/R/site-library/ggplot2’
ERROR: dependency ‘lme4’ is not available for package ‘BradleyTerry2’
* removing ‘/usr/local/lib/R/site-library/BradleyTerry2’
ERROR: dependencies ‘ggplot2’, ‘reshape2’, ‘BradleyTerry2’ are not available for package ‘caret’
* removing ‘/usr/local/lib/R/site-library/caret’

The downloaded source packages are in
    ‘/tmp/RtmpcLo8Rw/downloaded_packages’
Warning messages:
1: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘minqa’ had non-zero exit status
2: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘RcppEigen’ had non-zero exit status
3: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘scales’ had non-zero exit status
4: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘reshape2’ had non-zero exit status
5: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘lme4’ had non-zero exit status
6: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘ggplot2’ had non-zero exit status
7: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘BradleyTerry2’ had non-zero exit status
8: In install.packages("caret", repos = "http://cran.rstudio.com/") :
  installation of package ‘caret’ had non-zero exit status

推荐答案

作为 caret文档建议执行 install.packages("caret", dependencies = c("Depends", "Suggests")) 以确保安装所有需要的包并解决所有依赖

As the caret Documentation suggests execute install.packages("caret", dependencies = c("Depends", "Suggests")) to ensure that all the needed packages are installed and resolve all the dependencies

这篇关于在 R 中安装插入符号包时的依赖性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆