简体   繁体   中英

Error while installing package kableExtra in R

I am trying to install kableExtra and get the following errors:

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:

install.packages("hms")

or via rstudio interface: packages -> install and type in "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. You can try to (re)install rtools . Sometimes there are missing parts of r installations. 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.

You have a trouble with the dependency with the package "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.

Here is how it looks in RGui. I guess your are not using RGui.

在此处输入图片说明

在此处输入图片说明

In Fedora 36, I solved with

$ sudo dnf install openssl-devel

and

$ sudo dnf install libcurl-devel

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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