Just installed an update of R and I am trying to install a few packages. Each time I try to load these packages (ggpubr, semPlot) etc. I get the following message all ending with 'there is no package called zip'
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘zip’
installing source package ‘zip’ ...
** package ‘zip’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘zip’
removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/zip’
Warning in install.packages :
installation of package ‘zip’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/z7/4jw2_dqd7t187t4bhlvkdfdr0000gn/T/RtmpAB1leK/downloaded_packages’
library(zip)
Error in library(zip) : there is no package called ‘zip’
The easiest solution would be to answer "no" to this question, you would get a precompiled binary version that is a little older but much easier to install.
If you need to install the latest version from source, then you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems. https://cran.r-project.org/bin/macosx/tools/
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: