C Compiler Error on R 3.5.3

Hi,

since the update to R 3.5.3 I can not install some packages, like 'install.packages("git2r")'. Which results in a C Compiler error message (see below).

I also installed this tools https://cran.r-project.org/bin/macosx/tools/ (clang 6.0.0 and gfortran 6.1)

installing the source package 'git2r'

trying URL 'https://cran.rstudio.com/src/contrib/git2r_0.25.2.tar.gz'
Content type 'application/x-gzip' length 1209396 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'git2r' ...
** package 'git2r' successfully unpacked and MD5 sums checked
checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/vg/4nywbj390lq647k3jm3hs1sw0000gn/T/Rtmpdz7Vt9/R.INSTALL4154512d21e/git2r':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package 'git2r'
* removing '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/git2r'
Warning in install.packages :
  installation of package 'git2r' had non-zero exit status

The downloaded source packages are in
	'/private/var/folders/vg/4nywbj390lq647k3jm3hs1sw0000gn/T/RtmpkXcvqk/downloaded_packages'

My sessionInfo():

R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3    yaml_2.2.0   

Solved this issue, however I'm not sure which point exactly did the trick. I'm on a MacBook which used a time machine backup to restore the system, then I also updated R from 3.4 to 3.5 - so many issues lie somewhere in this migrations.
On the process to make things work again I updated homebrew within terminal, on the way doing so I had to change ownership of many sys folders and persmissions. I also updated the lang settings: https://stackoverflow.com/questions/9689104/installing-r-on-mac-warning-messages-setting-lc-ctype-failed-using-c

After all that (and maybe some steps missing) this error was resolved. I can not provide any more info on that. But now it works on my machine.

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.