Cannot load Rcmdr on Mac

Hi,

I am really struggling to get R commander to run,
I managed to get data.table to install using:
install.packages("data.table", type = "binary")

But i am now getting the error message:

library(Rcmdr)
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Error: package or namespace load failed for ‘Rcmdr’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
In addition: Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1

Any help would be amazing!
Thanks :slight_smile:

Hi @Irj, and welcome!

Judging from your error messages, there are a couple of dependencies that Rcmdr needs that are missing in MacOS.

The first is the command line components for xcode in order to compile some packages in R, as well as additional functionality such as git. You don't need to install all of Xcode, but in the terminal, type xcode-select --install

This addresses the error message: xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

The second missing component is Xquartz, which is a X11 windowing system. This can be installed from the link on https://www.xquartz.org/ or via homebrew as brew cask install xquartz.

This addresses the error message: Library not loaded: /opt/X11/lib/libX11.6.dylib and is a dependency of tcktk.

HTH

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.

HI @Irj,
The first part (xcode-select --install) is not in R, but in the Terminal app in Mac OSX, or the Terminal Tab in Rstudio.

Hi there!

Thanks for your help, when i enter the xcode-select --install code, I get the response Error: object 'xcode' not found

Do you have an ideas as to why this might be/ how to rectify?

Hmm. Sounds like something is blocking the network connection. There's also a link for various versions of Command Line Tools for Xcode (e.g. 11.5 and 12) at https://developer.apple.com/download/more/. You may have to sign in using an AppleID account, and the basic level is free if you agree to the User Agreement.

Oh I understand, thanks

Unfortunately that is coming back saying "Can't install the software because it is not currently available from the Software Update server". I assume that's not something I can work around?

Thank you, I will take a look