sed and expr not found and non-zero exit status when installing igraph


I'm getting the following issue installing igraph within rstudio on Mac. I've seen something similar on Linux forums that suggest it's an issue with my PATH, but not sure how to fix it in this context.

Thanks in advance for any assistance!

Installing package into ‘/usr/local/lib/R/3.6/site-library’
(as ‘lib’ is unspecified)
trying URL ''
Content type 'application/x-gzip' length 2704004 bytes (2.6 MB)
downloaded 2.6 MB

 installing *source* package ‘igraph’ ...
 package ‘igraph’ successfully unpacked and MD5 sums checked
 using staged installation
./configure: line 473: sed: command not found
./configure: line 472: expr: command not found
./configure: line 473: sed: command not found
./configure: line 487: sed: command not found
: error: cannot create .lineno; rerun with a POSIX shell
ERROR: configuration failed for package ‘igraph’
* removing ‘/usr/local/lib/R/3.6/site-library/igraph’
sh: rm: command not found
Warning in install.packages :
  installation of package ‘igraph’ had non-zero exit status

The downloaded source packages are in

Have you tried updating xcode in your system?

Isn't even installed on my machine, downloading now!

Xcode v11 installed, no change to issue I'm afraid

This thread seems to be continued here: Rstudio/R can't find path for sh