Hi thanks for your response, i looked over the installation process as you suggested and managed to find the issue.
Apologies for not having great formating on the forum still trying to learn that. Hope this is the correct way to paste what I did.
Quick note, this section "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun" repeated a bunch of times so I deleted them for brevity.
> install.packages("stringi")
There is a binary version available but the source version is later:
binary source needs_compilation
stringi 1.7.6 1.7.8 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘stringi’
trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.7.8.tar.gz'
Content type 'application/x-gzip' length 8032287 bytes (7.7 MB)
==================================================
downloaded 7.7 MB
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /Library/Frameworks/R.framework/Resources
checking for R... /Library/Frameworks/R.framework/Resources/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for cat... /bin/cat
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
checking for local ICUDT_DIR... icu69/data
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/md/sypj6n0x40zb7qxcxry8cb5w0000gn/T/RtmpTcNrp4/R.INSTALL14a0f94503eb/stringi':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/stringi’
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/md/sypj6n0x40zb7qxcxry8cb5w0000gn/T/RtmpfYLver/downloaded_packages’
>
I found that the issue arose when I type yes in response to this:
There is a binary version available but the source version is later:
binary source needs_compilation
stringi 1.7.6 1.7.8 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘stringi’
But when I typed no it installed normally and everything has been running fine since. I think the clue was when I saw this section of the error message.
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
I figured it had something to do with configuring, not that I have any clue what that means. But typing No in response to that question seemed to load it fine, as per below:
> install.packages("stringi")
There is a binary version available but the source version is later:
binary source needs_compilation
stringi 1.7.6 1.7.8 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/stringi_1.7.6.tgz'
Content type 'application/x-gzip' length 14390020 bytes (13.7 MB)
==================================================
downloaded 13.7 MB
The downloaded binary packages are in
/var/folders/md/sypj6n0x40zb7qxcxry8cb5w0000gn/T//RtmpfYLver/downloaded_packages
>
So hopefully if anyone else has the same issue this will help. Thanks for your help andresrcs, really appreciate it. Big weight off my shoulders!
Cheers,
-L