lavaan package deployment error: unable to load shared object ''/opt/R/3.4.0/lib/R/library/quadprog/libs/quadprog.so'

332 views
Skip to first unread message

Fien Gistelinck

unread,
Aug 28, 2018, 2:20:52 PM8/28/18
to shinyapps.io Users
Hi, 
I'm writing a Shiny-app based on a particular version of lavaan.
The app works perfect locally, but as soon as I try to deploy it, I get an error when preparing the package for lazy loading.

A part of the task log is as follows:

[2018-08-28T17:54:56.160473657+0000] Installing R package: quadprog (1.5-5)
* installing to library �/opt/R/3.4.0/lib/R/library
* installing *binary* package quadprog ...
* DONE (quadprog)
[2018-08-28T17:54:56.397939822+0000] Building R package: lavaan (0.5-23.1097)
/mnt/packages/build /mnt
* installing to library �/opt/R/3.4.0/lib/R/library
* installing *source* package lavaan ...
** package lavaan successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared
object '/opt/R/3.4.0/lib/R/library/quadprog/libs/quadprog.so':
  libRblas
.so: cannot open shared object file: No such file or directory
ERROR
: lazy loading failed for package lavaan
* removing �/opt/R/3.4.0/lib/R/library/lavaan

Based on previous questions, I thought there was an issue on the quadprog package, 
but as you can see above, the package was correctly build in the application.

Any ideas?
Much appreciated!

Yours sincerly

Joshua Spiewak

unread,
Aug 28, 2018, 2:28:31 PM8/28/18
to shinyapps.io Users
The problem is that quadprog, while it successfully installed, was improperly compiled against a bad R binary and then cached.
When lavaan was installed, it tried to actually load the shared library from quadprog, which failed due linking against a library from that bad R binary.
I have flushed quadprog from the cache for R 3.4.0, and that should cause it to be rebuilt against the proper R binary.

Let me know how it goes.

Fien Gistelinck

unread,
Aug 29, 2018, 4:12:57 AM8/29/18
to shinyapps.io Users
Hi, Joshua.
It deploys now! Yeej!
Thank you so much for your help!! 
Reply all
Reply to author
Forward
0 new messages