HopkinsIDD / flepiMoP

The Flexible Epidemic Modeling Pipeline
https://flepimop.org
GNU General Public License v3.0
9 stars 4 forks source link

Missing dependencies for installation of necessary R packages on Ubuntu 22.04 #231

Closed twallema closed 3 weeks ago

twallema commented 3 months ago

Issue

While installing flepiMoP on an Ubuntu 22.04 LTS machine I ran into some missing dependencies when installing the necessary R packages sf and ggraph,

R
> install.packages("sf")

yielded the following error,

* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++14
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/sf’
...
The downloaded source packages are in
    ‘/tmp/RtmptGnmYa/downloaded_packages’
Warning message:
In install.packages(c("readr", "sf", "lubridate", "tidyverse", "gridExtra",  :
  installation of package ‘sf’ had non-zero exit status

and,

R
> install.packages("ggraph")

yielded,

** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-igraph/00new/igraph/libs/igraph.so':
  libopenblas.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/igraph’
ERROR: dependency ‘igraph’ is not available for package ‘tidygraph’
* removing ‘/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/tidygraph’
ERROR: dependency ‘igraph’ is not available for package ‘graphlayouts’
* removing ‘/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/graphlayouts’
ERROR: dependencies ‘igraph’, ‘tidygraph’, ‘graphlayouts’ are not available for package ‘ggraph’
* removing ‘/home/twallema/R/x86_64-pc-linux-gnu-library/4.1/ggraph’

The downloaded source packages are in
    ‘/tmp/Rtmpso5Lrm/downloaded_packages’
Warning messages:
1: In install.packages("ggraph", DEPENDENCIES = TRUE) :
  installation of package ‘igraph’ had non-zero exit status
2: In install.packages("ggraph", DEPENDENCIES = TRUE) :
  installation of package ‘tidygraph’ had non-zero exit status
3: In install.packages("ggraph", DEPENDENCIES = TRUE) :
  installation of package ‘graphlayouts’ had non-zero exit status
4: In install.packages("ggraph", DEPENDENCIES = TRUE) :
  installation of package ‘ggraph’ had non-zero exit status

The missing dependencies were gdal-config to install sf and libopenblas to install ggraph.

Fixed how

sudo apt-get install libgdal-dev libopenblas-dev

Proposition

Add to documentation that the installation of libgdal-dev (for sf) and libopenblas-dev (for ggraph) may be needed for Debian users.

twallema commented 3 months ago

Adding to this, when using the IVAC guest network, downloading R packages from CRAN is impossible, throwing "403 Service unavailable" errors.

jcblemai commented 3 months ago

Yes, that would be great. Would you be able to fix this ? Do you have a gitbook account ? Or want to fix the documenation using GitHub ? I would say hintbox about how to deal with these .so files would be welcome (if you get a libxxxxxx.so.0: cannot open shared object file error, then you need to install the right package from your package manage ((and sometime simlink but we can skip this)).

I think the IVAC error is pretty common when using these "free" network with a webpage entry point.

twallema commented 3 months ago

I'll hold out a little until the docs+code repos are merged and then find a suitable spot to include a notice to new Ubuntu users.

jcblemai commented 3 months ago

It's already the case since last week (or before)

saraloo commented 3 months ago

There are some notes throughout the run guides with some hintboxes for mac and for windows, so if you want to add a hintbox for linux specific, feel free