0

I was trying to download package tidyverse, it showed there is no package vctrs when I run tidyverse library. And I had an error when downloading vctrs. Anyone can help?

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’*
> install.packages("vctrs", repos = "https://packagemanager.rstudio.com/cran/latest")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘vctrs’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘vctrs’

trying URL 'https://packagemanager.rstudio.com/cran/latest/src/contrib/vctrs_0.6.0.tar.gz'
Content type 'binary/octet-stream' length 963208 bytes (940 KB)
==================================================
downloaded 940 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/RtmpPjgcJT/downloaded_packages’

I was trying to download package tidyverse, it showed there is no package vctrs when I run tidyverse library. And I had an error when downloading vctrs. Anyone can help?

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 2
    The error message includes `Try removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-vctrs’` what happens if you try that? – Phil Mar 21 '23 at 02:00
  • Have a look at this post: https://stackoverflow.com/questions/60451908/tidyverse-not-loaded-it-says-namespace-vctrs-0-2-0-is-already-loaded-but/ – Edward Mar 21 '23 at 02:03
  • 2
    The `00LOCK-*` directories, once they "stick" from a failed installation, are "never" (in my experience) cleared automatically, for whatever reason. It's easy to miss that in the volume of output you get while installing (or failing to install) packages, and I have reattempted several times (yesterday, in fact :-( ...) before recognizing that it is in there. Really, find that directory and delete, it's easy and unavoidable. – r2evans Mar 21 '23 at 02:06

0 Answers0