简体   繁体   English

在 R 中安装 package kableExtra 时出错

[英]Error while installing package kableExtra in R

I am trying to install kableExtra and get the following errors:我正在尝试安装 kableExtra 并收到以下错误:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) : 
there is no package called 'hms'
ERROR: lazy loading failed for package 'kableExtra'

*removing 'C:/Users/Tim/Documents/R/win-library/3.2/kableExtra'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" CMD INSTALL -l "C:\Users\Tim\Documents\R\win-library\3.2"      
C:\Users\Tim\AppData\Local\Temp\RtmpUJQfwD/downloaded_packages/kableExtra_0.9.0. 
 tar.gz' had status 1
Warning in install.packages :
installation of package ‘kableExtra’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\Tim\AppData\Local\Temp\RtmpUJQfwD\downloaded_packages’

How can I solve my problem?我该如何解决我的问题? Thanks in advance!提前致谢!

it seems kableExtra depends on the package "hms" so try install it before with:似乎 kableExtra 依赖于包“hms”,所以请先尝试安装它:

install.packages("hms")

or via rstudio interface: packages -> install and type in "hms"或通过 rstudio 界面:packages -> install 并输入“hms”

also try this command:也试试这个命令:

install.packages("kableExtra", dependencies = TRUE)

If there appear problems like installing rlang or something similar, there is no general solution for this.如果出现安装rlang或类似问题,则没有通用的解决方案。 You can try to (re)install rtools .您可以尝试(重新)安装rtools Sometimes there are missing parts of r installations.有时会缺少 r 安装的部分。 My guess if R can't install a dependencie is, that some library or tools of the R environment are missing or wrongly installed which have to be detected.我的猜测是,如果 R 无法安装依赖项,则必须检测到 R 环境的某些库或工具丢失或安装错误。

You have a trouble with the dependency with the package "hms".您对包“hms”的依赖有问题。 I have not got how you are installing the r package, but you can either install it first and then try it again or start the installation with the option of download and install all required dependencies, in the second option you need to be online and allow the package manager to intall what is required.我不知道您是如何安装 r 包的,但是您可以先安装它然后再试一次,或者使用下载并安装所有必需依赖项的选项开始安装,在第二个选项中,您需要在线并允许包管理器来安装所需的东西。

Here is how it looks in RGui.这是它在 RGui 中的样子。 I guess your are not using RGui.我猜你没有使用 RGui。

在此处输入图片说明

在此处输入图片说明

In Fedora 36, I solved with在 Fedora 36 中,我解决了

$ sudo dnf install openssl-devel

and

$ sudo dnf install libcurl-devel

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM