Home > database >  General Questions about installation of igraph and other programs
General Questions about installation of igraph and other programs

Time:11-09

I am struggling to complete simple task again on R now that I'm using a different computer. Windows instead of Mac.... anyways. I was wondering if anyone could point me in the right direction as to how to install igraph? I'm attempting to install igraph and I get this messsage...

installation of package ‘igraph’ had non-zero exit status

I then proceeded to look up why this was occuring, realized that I need Rtools(which I have already) and additionally glpx,lbxm2,and gmp. Which I am also struggling to dowload.. can someone point me in the right direction?

CodePudding user response:

You need to install Rtools on Windows. Then you need to add a line in your .Renviron that refers to said Rtools installation. Please read this carefully. Especially the part that says this line has to be in your .Renviron-file: PATH="${RTOOLS40_HOME}\usr\bin;${PATH}".

I'd use usethis::edit_r_environ() to locate the important file.

Secondly, if you need to install anything, then use {installr}-package.

Second part

In case you need to install something as part of the Rtools installation, you need to do the following:

  1. Press Windows-Key and write Rtools Bash. Wait until it finds it, and press Enter.
  2. This will give you a bash terminal within the rtools environment.
  3. Write pacman -Sy in there and press Enter.
  4. Then write pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-libxml2 mingw-w64-{i686,x86_64}-gmp and press Enter. (Or whatever else you need to install

This should then do what is needed to install those missing components.

  •  Tags:  
  • r
  • Related