Issue in running library(tidyverse)

I try to download packages ("tidyverse"), when I run library(tidyverse), there is error:

Error: package or namespace load failed for ‘tidyverse’:
.onAttach failed in attachNamespace() for 'tidyverse', details:
call: NULL
error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘vctrs’

it shows there is no package called 'vctrs', then I try to download 'vtrs', it show:

There is a binary version available but the source version is later:
binary source needs_compilation
vctrs 0.5.2 0.6.0 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘vctrs’

trying URL ''
Content type 'application/x-gzip' length 964158 bytes (941 KB)

downloaded 941 KB

ERROR: failed to lock directory ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library’ for modifying
Try removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status

The downloaded source packages are in

Anyone can help me to solve this problem?:sob:

I know there is a lot of text to read, but here I have helped identify the part that guides you to fix :

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.