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:
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