Problem with installing R commander

Hello, I have an error message when trying to install R commander as below:

Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Error: package or namespace load failed for ‘RcmdrMisc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘cli’
Error: package ‘RcmdrMisc’ could not be loaded

Thanks for your help.

Try installing the missing package

install.packages("cli")

Thank you for your reply. But I received an error message when I tried to install "cli".

install.packages("cli")

There is a binary version available but the source version is later:
binary source needs_compilation
cli 3.3.0 3.4.0 TRUE

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

trying URL 'https://cran.case.edu/src/contrib/cli_3.4.0.tar.gz'
Content type 'application/x-gzip' length 526797 bytes (514 KB)

downloaded 514 KB

  • installing source package ‘cli’ ...
    ** package ‘cli’ 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 ‘cli’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/cli’

The downloaded source packages are in
‘/private/var/folders/j3/pg1fk5vs3rn_6949tpl5_fmc0000gn/T/RtmpHcaBGI/downloaded_packages’
Warning message:
In install.packages("cli") :
installation of package ‘cli’ had non-zero exit status

Thank you for helping me out. Thank you.

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://mac.r-project.org/tools/

This topic was automatically closed 21 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.