This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cannot install ANY PACKAGE in R (MAC OS Mojave)

Hello guys! Unfortunatelu i am not able to install ANY package in Rstudio. R is the last version (3.5.1 i Believe) Any advice? That's the error!

ld: library not found for -lintl
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sourcetools.so] Error 1
ERROR: compilation failed for package ‘sourcetools’
* removing ‘/usr/local/lib/R/3.5/site-library/sourcetools’
r software error

Have you installed Xcode and developer tools? It looks like that particular library may be part of gettext which you will need to install.

I installed Xcode but I don't think I installed the developer tools. Could you link it please?

Search using google on how to install command line developer tools. You also need to install a particular library besides these tools.

They just say to install Xcode (and I did) I cannot find any particular reference with what you say!

1 answer

SOLVED!!!! I followed this guide here: https://github.com/adamhsparks/setup_macOS_for_R

Suggestion, if during the makevar manipulation you are not able to modify it, use nano in sudo:

sudo nano ~/.R/Makevars

Log in to answer this question.