VRPM包安装失败解决方案:had non-zero exit status

Posted Data+Science+Insight

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VRPM包安装失败解决方案:had non-zero exit status相关的知识,希望对你有一定的参考价值。

VRPM包安装失败解决方案:had non-zero exit status

目录

VRPM包安装失败解决方案:had non-zero exit status

#VRPM包安装

#找到VRPM包的文件地址手动安装

#尝试添加依赖

#尝试套用如下方案

#尝试使用Rstudio

#接着继续使用Rstudio本地安装VRPM包成功


#VRPM包安装

install.packages("VRPM")
# library(VRPM)
# help(VRPM)
Warning message:
"package 'VRPM' is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages"

#找到VRPM包的文件地址手动安装

# packageurl <- "https://cran.r-project.org/src/contrib/Archive/ElemStatLearn/ElemStatLearn_2015.6.26.tar.gz"
packageurl <- "https://cran.r-project.org/src/contrib/Archive/VRPM/VRPM_1.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

 安装出现如下错误:

Warning message in install.packages(packageurl, repos = NULL, type = "source"):
"installation of package 'C:/Users/user~1/AppData/Local/Temp/RtmpmYFIj5/downloaded_packages/VRPM_1.1.tar.gz' had non-zero exit status"

#尝试添加依赖

packageurl <- "https://cran.r-project.org/src/contrib/Archive/VRPM/VRPM_1.2.tar.gz"
# packageurl <- "https://cran.r-project.org/src/contrib/Archive/VRPM/VRPM_1.2.tar.gz"
# install.packages(packageurl, repos=NULL, type="source")
# dependencies = T
# install.packages(packageurl, repos=NULL, type="source",dependencies = TRUE)
install.packages(packageurl, repos=NULL, type="source",dependencies = c("Depends"))
#可能依赖又不在这个目录下,所以依旧had non-zero exit status

#尝试套用如下方案

download.file('http://stat-athens.aueb.gr/~jbn/papers/files/14/14_bivpois_RDATA.zip', 
              f <- tempfile())
unzip(f, exdir=tempdir())
load(file.path(tempdir(), '.RData'))

#有人说可能是文件包解压不彻底,及压缩包内还有压缩包

#获取包安装路径查看,根本都没有形成包,,,,

(.libPaths())

折腾了好久,,,

笔者平时一般都是使用jupyter,即在jupyter中使用R环境;

#尝试使用Rstudio

下载安装包(下载链接https://cran.r-project.org/src/contrib/Archive/VRPM/) →打开Rstudio→点击菜单栏中的Tools→在弹窗的Install from中选择“Package Archive File (.zip; .tar; .gz)”→点击Browse,选择压缩包→点击Install。

> install.packages("D:/Downloads/VRPM_1.2.tar.gz", repos = NULL, type = "source")
ERROR: dependencies 'fields', 'R2html', 'kernlab', 'ROCR', 'shiny' are not available for package 'VRPM'
* removing 'D:/R/R-4.0.5/library/VRPM'
Warning in install.packages :
  installation of package ‘D:/Downloads/VRPM_1.2.tar.gz’ had non-zero exit status

#安装虽然依旧失败,但是最起码指明了方向;

#补齐依赖包

# install.packages("VRPM")
# library(VRPM)
# help(VRPM)
#  'fields', 'R2HTML', 'kernlab', 'ROCR', 'shiny'
install.packages(c('fields', 'R2HTML', 'kernlab', 'ROCR', 'shiny'))
还安装相依关系'dotCall64', 'spam', 'fontawesome', 'htmltools', 'bslib'
package 'dotCall64' successfully unpacked and MD5 sums checked
package 'spam' successfully unpacked and MD5 sums checked
package 'fontawesome' successfully unpacked and MD5 sums checked
package 'htmltools' successfully unpacked and MD5 sums checked
Warning message:
"cannot remove prior installation of package 'htmltools'"
Warning message in file.copy(savedcopy, lib, recursive = TRUE):
"拷贝D:\\anaconda\\envs\\r4-base\\lib\\R\\library\\00LOCK\\htmltools\\libs\\x64\\htmltools.dll到D:\\anaconda\\envs\\r4-base\\lib\\R\\library\\htmltools\\libs\\x64\\htmltools.dll时出了问题:Permission denied "
Warning message:
"restored 'htmltools'"
package 'bslib' successfully unpacked and MD5 sums checked
package 'fields' successfully unpacked and MD5 sums checked
package 'R2HTML' successfully unpacked and MD5 sums checked
package 'kernlab' successfully unpacked and MD5 sums checked
package 'ROCR' successfully unpacked and MD5 sums checked
package 'shiny' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\\Users\\liguangdi\\AppData\\Local\\Temp\\Rtmp0Ge1aY\\downloaded_packages

#注意其中发生了一个permission的错误:

继续在Rstudio中执行

install.packages(c('fields', 'R2HTML', 'kernlab', 'ROCR', 'shiny'))

#接着继续使用Rstudio本地安装VRPM包成功

> install.packages("D:/Downloads/VRPM_1.2.tar.gz", repos = NULL, type = "source")
* installing *source* package 'VRPM' ...
** 成功将'VRPM'程序包解包并MD5和检查
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'VRPM'
    finding HTML links ... 好了
    HTMLsummary                             html  
    ccchart                                 html  
    cchart                                  html  
    colplot                                 html  
    plotperf                                html  
    preplotperf                             html  
    runVRPMexample                          html  
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (VRPM)
> library(VRPM)


This is a package to visualize risk prediction models. For each predictor, a color bar represents the contribution to the linear predictor or latent variable. A conversion from the linear predictor to the estimated risk or survival is also given. (Cumulative) contribution charts enable to visualize how the estimated risk for one particular observation is obtained by the model. Several options allow to choose different color maps, and to select the zero level of the contributions. The package is able to deal with 'glm', 'coxph', 'mfp', 'multinom' and 'ksvm' objects. For 'ksvm' objects, the visualization is not always exact. Functions providing tools to indicate the accuracy of the approximation are provided in addition to the visualization.
参考:安装r包报错“package 'robustbase' had non-zero exit status”_BIO_Shixxy-程序员宅基地

参考:Visualising statistical models using dynamic nomograms

参考:在R中安装脱字号软件包时的依赖性问题

参考:"installation of package 'FILE_PATH' had non-zero exit status" in R

参考:VRPM: Visualizing Risk Prediction Models

参考:https://cran.r-project.org/src/contrib/Archive/VRPM/

参考:non-zero exit status - installing from tar.gz

参考:Fixed: installation of a package had non-zero exit status

参考:介绍一种全新的彩色列线图

参考:R教程:教你绘制5种类型的诺莫图 (列线图)

以上是关于VRPM包安装失败解决方案:had non-zero exit status的主要内容,如果未能解决你的问题,请参考以下文章

R语言CRAN不包含的安装包下载并手动使用RStudio进行安装实战:以下载VRPM包及绘制彩色列线图为例

安装一个软件提示,该安装包未包含任何证书,安装失败,怎么解决

VS2015 安装包缺失(联网安装失败)问题解决

解决pycharm安装包失败方法

android studio编译包真机安装失败解决方案记录

安装SQL2000时,出现错误“对于MSSQLServer服务,服务控制器操作失败:1726远程过程调用失败”,怎样解决?