GLEON / GLMr

R package for basic GLM model running
8 stars 16 forks source link

Problems running GLMr on Debian Stretch #122

Open bharris-fs opened 6 years ago

bharris-fs commented 6 years ago

When I run example(run_glm, run.dontrun=TRUE), I get an error:

> example(run_glm, run.dontrun=TRUE)

rn_glm> sim_folder <- system.file('extdata', package = 'GLMr')

rn_glm> run_glm(sim_folder)
/usr/local/lib/R/site-library/GLMr/exec/nixglm: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
[1] 127

rn_glm> out_file <- file.path(sim_folder,'output.nc')

rn_glm> nml_file <- file.path(sim_folder,'glm2.nml')

rn_glm> library(glmtools)
Loading required package: rLakeAnalyzer

This information is preliminary or provisional and is subject to revision. It
is being provided to meet the need for timely best science. The information has
not received final approval by the U.S. Geological Survey (USGS) and is
provided on the condition that neither the USGS nor the U.S. Government shall
be held liable for any damages resulting from the authorized or unauthorized
use of the information. Although this software program has been used by the
USGS, no warranty, expressed or implied, is made by the USGS or the U.S.
Government as to the accuracy and functioning of the program and related
program material nor shall the fact of distribution constitute any such
warranty, and no responsibility is assumed by the USGS in connection therewith
.

Attaching package: ‘glmtools’

The following objects are masked from ‘package:rLakeAnalyzer’:

    epi.temperature, hypo.temperature, whole.lake.temperature

rn_glm> fig_path <- tempfile("temperature", fileext = '.png')

rn_glm> plot_temp(file = out_file, fig_path = fig_path)
Error in R_nc4_open: No such file or directorytime
Error in nc_open(file, readunlim = TRUE) : 
  Error in nc_open trying to open file /usr/local/lib/R/site-library/GLMr/extdata/output.nc

It appears that there are two problems:

  1. run_glm()wants libpng12, but that seems to be a particular version. I've got libpng-dev, libpng-tools, and libpng16-16 installed; libpng12 isn't even an option.

  2. run_glm() is trying to write output to a directory. that's protected on Linux..

I can change where the file gets written, if only the libpng12 problem didn't exist. Does GRMr really need that version? Here's my session info:

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so

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

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

other attached packages:
[1] glmtools_0.14.6      rLakeAnalyzer_1.11.4 GLMr_3.1.16         

loaded via a namespace (and not attached):
 [1] splines_3.4.4      gtools_3.5.0       StanHeaders_2.17.2 threejs_0.3.1     
 [5] shiny_1.0.5        assertthat_0.2.0   sp_1.2-7           stats4_3.4.4      
 [9] pillar_1.2.1       lattice_0.20-35    glue_1.2.0         digest_0.6.15     
[13] promises_1.0.1     minqa_1.2.4        colorspace_1.3-2   htmltools_0.3.6   
[17] httpuv_1.4.1       Matrix_1.2-14      plyr_1.8.4         devtools_1.13.5   
[21] dygraphs_1.1.1.4   pkgconfig_2.0.1    rstan_2.17.3       xtable_1.8-2      
[25] scales_0.5.0       later_0.7.1        lme4_1.1-17        tibble_1.4.2      
[29] bayesplot_1.5.0    ggplot2_2.2.1      DT_0.4             withr_2.1.2       
[33] shinyjs_1.0        lazyeval_0.2.1     survival_2.42-3    magrittr_1.5      
[37] mime_0.5           memoise_1.1.0      ncdf4_1.16         nlme_3.1-137      
[41] MASS_7.3-49        xts_0.10-2         colourpicker_1.0   rsconnect_0.8.8   
[45] tools_3.4.4        loo_2.0.0          matrixStats_0.53.1 stringr_1.3.0     
[49] munsell_0.4.3      bindrcpp_0.2.2     akima_0.6-2        compiler_3.4.4    
[53] rlang_0.2.0        grid_3.4.4         nloptr_1.0.4       ggridges_0.5.0    
[57] rstudioapi_0.7     rstanarm_2.17.4    htmlwidgets_1.2    crosstalk_1.0.0   
[61] igraph_1.2.1       miniUI_0.1.1       base64enc_0.1-3    gtable_0.2.0      
[65] codetools_0.2-15   inline_0.3.14      markdown_0.8       reshape2_1.4.3    
[69] R6_2.2.2           gridExtra_2.3      rstantools_1.5.0   zoo_1.8-1         
[73] dplyr_0.7.4        bindr_0.1.1        shinystan_2.4.0    shinythemes_1.1.1 
[77] stringi_1.1.7      parallel_3.4.4     Rcpp_0.12.16