简体   繁体   中英

Error loading library tidyverse, dbplyr, ggplot2

I would like to install more packages in RStudio and got a error message. Before, I worked with gglot2 and it worked well. When I tried to install other packages, more errors occure.

I loaded library DBI , vctrs without a problem, then I'm trying:

> library(ggplot2)

Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘vctrs’ 0.4.0 is already loaded, but >= 0.5.0 is required

> library(tidyverse)

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘vctrs’ 0.4.0 is already loaded, but >= 0.4.1 is required

> library(lubridate)

> library(dbplyr)

Error: package or namespace load failed for ‘dbplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘cli’ 3.2.0 is already loaded, but >= 3.3.0 is required

I checked all updates, restart R Studio, tried to update vctrs , but anything works. Could anyone help me?

It appears you have old versions of packages installed and loaded.

For example, you have a version of vctrs installed but ggplot2 needs a more recent version. This is especially a problem if you have already called library(vctrs) because the active version of the package is already determined.

The simplest solution is to update your packages. Here are many questions on Stackoverflow about how to do that. Try some of the following links:

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