Error after deploying shiny app (R version 3.5)




I deployed my shiny app successfully from RStudio (using R version 3.5) to

Preparing to deploy application...DONE
Uploading bundle for application: 381498...DONE
Deploying bundle: 1481380 for application: 381498 ...
Waiting for task: 537322325
  building: Parsing manifest
  building: Building image: 1495751
  building: Installing system dependencies
  building: Fetching packages
  building: Installing packages
  building: Installing files
  building: Pushing image: 1495751
  deploying: Starting instances
  unstaging: Stopping old instances
Application successfully deployed to

However, when trying to start the application, I receive the following error message:

Error in value[[3L]](cond) : 
  package or namespace load failed for ‘clusterProfiler’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/R/3.5.0/lib/R/library/units/libs/': cannot open shared object file: No such file or directory
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

It seems like a problem with the Bioconductor package "clusterProfiler". I tried removing the package and re-installing from the Bioconductor website Link, however, that did not resolve the issue.

Here is my session information:

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] htmlwidgets_1.2             rintrojs_0.2.0              shinythemes_1.1.1          
 [4] shinyjs_1.0                 DT_0.4                      plotly_4.7.1               
 [7] ggplot2_3.0.0               preprocessCore_1.42.0       scran_1.8.2                
[10] edgeR_3.22.3                limma_3.36.2                DOSE_3.6.1                 
[13] clusterProfiler_3.8.1         
[16]          AnnotationDbi_1.42.1        corrplot_0.84              
[19] pheatmap_1.0.10             RColorBrewer_1.1-2          Rtsne_0.13                 
[22] irlba_2.3.2                 Matrix_1.2-14               SingleCellExperiment_1.2.0 
[25] SummarizedExperiment_1.10.1 DelayedArray_0.6.1          BiocParallel_1.14.2        
[28] matrixStats_0.53.1          Biobase_2.40.0              GenomicRanges_1.32.4       
[31] GenomeInfoDb_1.16.0         IRanges_2.14.10             S4Vectors_0.18.3           
[34] BiocGenerics_0.26.0         iasva_0.99.3                rsconnect_0.8.8            
[37] shiny_1.1.0                

loaded via a namespace (and not attached):
 [1] fgsea_1.6.0              ggbeeswarm_0.6.0         colorspace_1.3-2        
 [4] rjson_0.2.20             ggridges_0.5.0           dynamicTreeCut_1.63-1   
 [7] qvalue_2.12.0            XVector_0.20.0           ggrepel_0.8.0           
[10] bit64_0.9-7              splines_3.5.0            tximport_1.8.0          
[13] GOSemSim_2.6.0           scater_1.8.0             jsonlite_1.5            
[16] packrat_0.4.9-3          cluster_2.0.7-1          GO.db_3.6.0             
[19] shinydashboard_0.7.0     ggforce_0.1.3            httr_1.3.1              
[22] compiler_3.5.0           rvcheck_0.1.0            assertthat_0.2.0        
[25] lazyeval_0.2.1           later_0.7.3              tweenr_0.1.5            
[28] htmltools_0.3.6          tools_3.5.0              bindrcpp_0.2.2          
[31] igraph_1.2.1             gtable_0.2.0             glue_1.2.0              
[34] GenomeInfoDbData_1.1.0   reshape2_1.4.3           DO.db_2.9               
[37] dplyr_0.7.6              fastmatch_1.1-0          Rcpp_0.12.17            
[40] enrichplot_1.0.2         RJSONIO_1.3-0            DelayedMatrixStats_1.2.0
[43] ggraph_1.0.2             stringr_1.3.1            mime_0.5                
[46] statmod_1.4.30           zlibbioc_1.26.0          MASS_7.3-49             
[49] scales_0.5.0             BiocInstaller_1.30.0     promises_1.0.1          
[52] rhdf5_2.24.0             yaml_2.1.19              memoise_1.1.0           
[55] gridExtra_2.3            UpSetR_1.3.3             stringi_1.2.3           
[58] RSQLite_2.1.1            rlang_0.2.1              pkgconfig_2.0.1         
[61] bitops_1.0-6             lattice_0.20-35          Rhdf5lib_1.2.1          
[64] purrr_0.2.5              bindr_0.1.1              cowplot_0.9.2           
[67] bit_1.1-14               tidyselect_0.2.4         plyr_1.8.4              
[70] magrittr_1.5             R6_2.2.2                 DBI_1.0.0               
[73] withr_2.1.2              pillar_1.2.3             units_0.6-0             
[76] RCurl_1.95-4.10          tibble_1.4.2             viridis_0.5.1           
[79] locfit_1.5-9.1           grid_3.5.0               data.table_1.11.4       
[82] blob_1.1.1               FNN_1.1                  digest_0.6.15           
[85] xtable_1.8-2             tidyr_0.8.1              httpuv_1.4.4.2          
[88] munsell_0.5.0            beeswarm_0.2.3           viridisLite_0.3.0       
[91] vipor_0.4.5       

I would appreciate any help on this issue and please let me know if I can provide further information.

Thank you,



It would appear that the package clusterProfiler has a dependency upon the system package libudunits2-dev.

You should be able to work around this by add library(udunits2) to your code.


Thank you very much, Josh! That resolved my issue perfectly.