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 'https://cran.rstudio.com/src/contrib/vctrs_0.6.0.tar.gz'
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
‘/private/var/folders/y6/q8h6pdqs5nd_tfn94mff_b700000gn/T/RtmpLN0qLS/downloaded_packages’
Anyone can help me to solve this problem?