# Installation issue on Mac

**URL:** <https://igraph.discourse.group/t/installation-issue-on-mac/1909>\
**Category:** Installation\
**Tags:** R\
**Created:** [12 December 2024 16:26 UTC](https://igraph.discourse.group/t/installation-issue-on-mac/1909 "2024-12-12T16:26:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salvo\_Lac](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@Salvo\_Lac](https://igraph.discourse.group/u/Salvo_Lac)\
**Post date:** [12 December 2024 16:26 UTC](https://igraph.discourse.group/t/installation-issue-on-mac/1909/1 "2024-12-12T16:26:32Z")

</div>

Hello, I am trying to install igraph in R via terminal by typing “install.packages(“igraph”, type = “source”)”. I am using MacBook Air Ventura 13.0, and I just install R latest version (4.4.2\_2). But I get the error below:

```auto
Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/homebrew/lib/R/4.4/site-library/00LOCK-igraph/00new/igraph/libs/igraph.so':
  dlopen(/opt/homebrew/lib/R/4.4/site-library/00LOCK-igraph/00new/igraph/libs/igraph.so, 0x0006): Library not loaded: @rpath/libc++.1.dylib
  Referenced from: <2752C6BE-86AB-33C1-9163-94303AC7981F> /opt/homebrew/lib/R/4.4/site-library/00LOCK-igraph/00new/igraph/libs/igraph.so
  Reason: tried: '/System/Volumes/Preboot/Cryptexes/OS@rpath/libc++.1.dylib' (no such file), '/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib/libc++.1.dylib' (no such file)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/homebrew/lib/R/4.4/site-library/igraph’

The downloaded source packages are in
	‘/private/var/folders/jd/8k7kg6v10sq4pnlc83zxy8wh0000gn/T/RtmpTPubzw/downloaded_packages’
Warning message:
In install.packages("igraph", type = "source") :
  installation of package ‘igraph’ had non-zero exit status

```

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [12 December 2024 18:37 UTC](https://igraph.discourse.group/t/installation-issue-on-mac/1909/2 "2024-12-12T18:37:31Z")

</div>

I’m not sure what’s going wrong. If libc++ is not accessible, your configuration may be broken.

What I _can_ say is that I do not recommend installing R with Homebrew. This will force you to compile all R packages from sources. Install R from CRAN: it will save you a lot of trouble, it’ll be more compatible in general, and you will gain access to pre-compiled packages from CRAN.

If you are not comfortable compiling software from sources and resolving the issues that come with it, then using Homebrew’s R is not a good idea.
