I am a newbie and trying to work with R for a SNA project for grad school. I am on a Mac OS 11.6 using Anaconda Navigator to access RStudio. I ran - install.packages("igraph") and got a warning " Warning in install.packages : installation of package ‘igraph’ had non-zero exit status". It then says
The downloaded source packages are in
‘/private/var/folders/fb/1572wy922ny8chpk2r0000gn/T/RtmpNX9bZr/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
library(igraph)
Error in library(igraph) : there is no package called ‘igraph’
I have no idea where to go from here. Any insight on this issue would be greatly appreciated (thank you in advance)
There should be more output during the package installation that should help people diagnose the problem. Can you post everything displayed after the install.packages() command?
installing source package ‘igraph’ ...
** package ‘igraph’ successfully unpacked and MD5 sums checked
** using staged installation
checking for x86_64-apple-darwin13.4.0-gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in /private/var/folders/fb/1572jwy92gnftg2ny8chpk2r0000gn/T/RtmpOAYoEn/R.INSTALL91f85125114f/igraph': configure: error: C compiler cannot create executables See config.log' for more details
ERROR: configuration failed for package ‘igraph’
removing ‘/Users/cherylrenz/opt/anaconda3/envs/R/lib/R/library/igraph’
Warning in install.packages :
installation of package ‘igraph’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/fb/1572jwy92gnftg2ny8chpk2r0000gn/T/RtmpNX9bZr/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
library(igraph)
Error in library(igraph) : there is no package called ‘igraph’
When using the Anaconda distribution you are supposed to install packages through the Anaconda Navigator or with Conda commands, not directly from CRAN.
Also have in mind that RStudio through Anaconda is not officially supported, so unless you have a compelling reason for using Anaconda for R, I would strongly recommend a stand alone installation instead.
@andresrcs - thank you so much for your reply! I was using Anaconda simply because it is required for my Python course and noticed and option to install R. I will do a stand alone installation and give that a shot. Thanks again - very much appreciated.