can't install 'ggiraph' in RStudio on mac

I am setting up RStudio on my mac, and can't install the package 'ggiraph' (which means several other packages won't install properly since they rely on ggiraph. When I attempt to install ggiraph I get the response below:

install.packages("ggiraph")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.5/ggiraph_0.9.2.tgz'
Error in .rs.downloadFile(url = urls, destfile = destfiles, method = "libcurl", :
cannot open URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.5/ggiraph_0.9.2.tgz'
In addition:
Warning messages:
1: In .rs.downloadFile(url = urls, destfile = destfiles, method = "libcurl", :
downloaded length 0 != reported length 276
2: In .rs.downloadFile(url = urls, destfile = destfiles, method = "libcurl", :
cannot open URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.5/ggiraph_0.9.2.tgz': HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘ggiraph’ failed

Any suggestions?

You might try downloading it directly from CRAN (https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/ggiraph_0.9.3.tgz).

Good news! That did result in a downloaded ggiraph folder. How do I use that download to install ggriaph into RStudio?

Try running install.packages("path/to/ggiraph_0.9.3.tgz", repos = NULL) in the RStudio console (replacing "path/to" with the appropriate path based on where you parked the download).