Packages not updating

I have recently updated both R and RStudio to the latest versions (R 4.3.1 and RStudio 2023.06.2+561) on my Intel MacBook Pro running Mac OS 11.7.8 (Big Sur). When I try to update the packages that need updating, I get the message that they have been downloaded:

The downloaded binary packages are in

… but they have not actually updated, because when I check for updates again, it says all the same packages need updating. Could it be that something is going wrong with compiling the binaries?

I tried manually deleting and reinstalling those packages with exactly the same result. I suppose it is possible that I need to update my operating system, but I tend to avoid this due to so many other things breaking.



Possibly you have the same issue: Packages not update on Mac - #6 by Gabor

Oh hmm, that could be it indeed. Unfortunately I am having trouble compiling packages from source due to some sort of bug in gcc - a separate issue I will be posting about soon. Thanks!

R does not use gcc on macOS by default. It uses Apple's clang, from XCode or from the XCode command line tools (CLT).

The best practice is to remove your custom ~/.R/Makevars file if you have one, and install the XCode command line tools.

Yes, I did this, and I think that’s actually the source of the problem. I can confirm that R is using clang:

deborahapthorp$ gcc --version Configured with: --prefix=/Applications/ --with-gxx-include-dir=/Applications/ Apple clang version 13.0.0 (clang-1300.0.29.30) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Applications/

… but I’m getting strings of warnings and errors when trying to compile from source. Any clues?