There is no package called 'zip'

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’

Help! Please.

Have you already tried installing the missing package? Do you get any error message while doing so?

install.packages("zip")

There is no package called zip!

Are there other error messages when you try to install it?

https://cran.r-project.org/web/packages/zip/index.html

Actually, there is! Can you explain why you think there isn't? Can you post the whole error message you get when you try to install it?

Yes

There is a binary version available but the source version is later:
binary source needs_compilation
zip 2.0.4 2.1.0 TRUE

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

trying URL 'https://cran.rstudio.com/src/contrib/zip_2.1.0.tar.gz'
Content type 'application/x-gzip' length 112796 bytes (110 KB)

downloaded 110 KB

  • 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/

Thank you so much! This was so beyond helpful.

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:

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