[statnet_help] Rglpk package problem

Mark S. Handcock handcock at ucla.edu
Thu Mar 26 13:13:49 PDT 2015


Hi Jacob,

For now the direct solution is to install GLPK, which Rglpk on the Mac
requires. This is not necessary on Windows. You will need administrator
privileges on the Mac to do this.

1) Download the latest version of GLPK by pointer your browser to:

ftp://mirrors.kernel.org/gnu/glpk/glpk-4.55.tar.gz

2) Assuming it is downloaded to your "~/Downloads" directory, go there
and execute the following commands (using the terminal)

cd ~/Downloads
tar -xzf glpk-4.55.tar.gz
cd glpk-4.55
./configure --prefix=/usr/local
make
sudo make install

3) Try to reinstall Rglpk in R.

Good luck!

Mark

On 3/25/15 5:13 PM, Jacob Young wrote:

> Hello,

>

> I have been receiving the following error when I type “library(ergm)”:

>

>> library(ergm)

> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :

> there is no package called ‘Rglpk’

> Error: package or namespace load failed for ‘ergm’

>

> I tried updating R to 3.1.3, reinstalling ergm, and updating erg. But, it still shows the same error. I tried installing Rglpk but I get the following errors:

>

>> install.packages("Rglpk")

>

> package ‘Rglpk’ is available as a source package but not as a binary

>

> Warning message:

> package ‘Rglpk’ is not available (as a binary package for R version 3.1.3)

>

> I also tried this:

>

>> install.packages("Rglpk",type="source")

> trying URL 'http://cran.fhcrc.org/src/contrib/Rglpk_0.6-0.tar.gz'

> Content type 'application/x-gzip' length 18284 bytes (17 KB)

> opened URL

> ==================================================

> downloaded 17 KB

>

> * installing *source* package ‘Rglpk’ ...

> ** package ‘Rglpk’ successfully unpacked and MD5 sums checked

> ** libs

> /bin/sh: line 0: cd: GLPK: No such file or directory

> make: *** [GLPK.ts] Error 1

> ERROR: compilation failed for package ‘Rglpk’

> * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rglpk’

>

> The downloaded source packages are in

> ‘/private/var/folders/1s/hf3fy0l15vl079d30044j7fw0000gp/T/RtmpAblncc/downloaded_packages’

> Warning message:

> In install.packages("Rglpk", type = "source") :

> installation of package ‘Rglpk’ had non-zero exit status

>

>

> In addition, I tried reinstalling statnet and I get the following error:

>> library(statnet)

> Loading required package: ergm

> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :

> there is no package called ‘Rglpk’

> Error: package ‘ergm’ could not be loaded

>

> The problem just started happening as I was working with ergm this afternoon. Any suggestions?

>

> --

> Jacob Young, PhD

> Assistant Professor

> School of Criminology and Criminal Justice

> Arizona State University

> Jacob.Young.1 at asu.edu

>

> _______________________________________________

> statnet_help mailing list

> statnet_help at u.washington.edu

> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help

>




More information about the statnet_help mailing list