I run RStudio Server (open source) with a common library on a Linux server and we use RQuantLib extensively as a dependency. After a recent update I started noticing the following .
Inside the RStudio Server IDE:
library("RQuantLib")
gives the following error:
Error: package or namespace load failed for ‘RQuantLib’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib/R/library/RQuantLib/libs/RQuantLib.so':
/usr/lib/R/library/RQuantLib/libs/RQuantLib.so: undefined symbol: _ZNK8QuantLib22InflationTermStructure8baseDateEv
Running from the Rstudio terminal yields the same result (although it does load if I run R as root)
Outside RStudio Server in Linux commandline
With the same user,
library("RQuantLib")
loads successfully:
RQuantLib 0.4.24 built with QuantLib version 1.35. See https://www.quantlib.org for more on QuantLib.
In both cases,
.libPaths()
yields
/usr/lib/R/library
In both cases RQuantLib.so has the same permissions:
-rwxrwxrwx 1 root root 117M Oct 3 12:55 RQuantLib.so
Sorry for the late reply. your message did not show up in my notifications.
From the ldd output we see that you seem to have two versions of QuantLib installed:
Can you see if you can standardize on one QuantLib version on the server? Otherwise you can try to set LD_LIBRARY_PATH in such a way to have /usr/local/lib before /lib.