igraph / rigraph

igraph R package
https://r.igraph.org
557 stars 202 forks source link

igraph fails to load because of missing glpk library #416

Closed aabor closed 4 years ago

aabor commented 4 years ago

I see the following error after installing igraph:

library(igraph)
Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/igraph/libs/igraph.so':
libglpk.so.40: cannot open shared object file: No such file or directory

qdap package also fails to load due to igraph issue... for docker image rocker/tidyverse:3.6.3 my SessionInfo():

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rJava_0.9-12 RColorBrewer_1.1-2 qdapTools_1.3.5
[4] qdapRegex_0.7.2 qdapDictionaries_1.0.7

loaded via a namespace (and not attached):
[1] XML_3.99-0.3 bitops_1.0-6 chron_2.3-55 jsonlite_1.6.1
[5] magrittr_1.5 data.table_1.12.8 mongolite_2.2.0 tools_3.6.3
[9] tinytex_0.22 RCurl_1.98-1.2 xfun_0.13 compiler_3.6.3
[13] pkgconfig_2.0.3
gaborcsardi commented 4 years ago

You need to install GLPK I guess?

aabor commented 4 years ago

I installed prerequisities in ubuntu and igraph loads correctly:

sudo apt-get update -y sudo apt-get install -y glpk-utils