non zero exit when installing package, only tidyverse

前端 未结 1 1222
时光取名叫无心
时光取名叫无心 2021-01-28 20:01

I\'ve set up hosted RStudio on Ubunto and have loaded several packages already with no issues, including caret and lubridate.

However, when I tried to install tidyverse

1条回答
  •  礼貌的吻别
    2021-01-28 20:29

    Looks like an issue with readr...

    Error in library.dynam(lib, package, package.lib) : 
      shared object ‘readr.so’ not found
    

    Use the code below to check if the package is installed. If not, it will be installed

    #Specify packages
    packages = c("readr")
    
    package.check <- lapply(packages, FUN = function(x) {
      if (!require(x, character.only = TRUE)) {
        install.packages(x, dependencies = TRUE)
        library(x, character.only = TRUE)
      }
    })
    
    #Verify they are loaded
    search()
    

    If it is installed, the file may be locked...

    #If "failed to create lock" is the returned error, install with the below code;
    install.packages("readr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
    

    (https://github.com/tidyverse/tidyverse/issues/99)

    0 讨论(0)
提交回复
热议问题