Installation of terra package fails on M2 pro chip mac

I need to use rshiny within rstudio which depends on the terra package but unfortunately i keep getting an error that installation of terra is unsuccessful.
I followed this instructions which should manually install the terra package but i get the error that 'mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64').
I then found this comment from earlier in the year about having challenges installing some r packages on m series.

Is there any workaround to my problem I can implement?

With

install.packages("terra")

with give you

which is the correct binary for the Silicon architecture. The link was installing by source, which is something that a macOS user is unlikely to be able to fix if not an experienced developer.

This topic was automatically closed 54 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.