Closed naanunaane closed 3 years ago
It can't load curl.so
because it can't find libcurl.so.4
unable to load shared object '/usr/local/lib/R/library/curl/libs/curl.so': libcurl.so.4: cannot open shared object file: No such file or directory
You have the header files (*-dev), but do you have the actual library installed too? For example, here's what I have installed on my Ubuntu laptop:
$ dpkg -S libcurl.so
libcurl4:amd64: /usr/lib/x86_64-linux-gnu/libcurl.so.4.6.0
libcurl4-openssl-dev:amd64: /usr/lib/x86_64-linux-gnu/libcurl.so
libcurl4:amd64: /usr/lib/x86_64-linux-gnu/libcurl.so.4
I'm closing this because it's highly unlikely this is an issue specific to TTR. But I'm happy to help troubleshoot, if I can.
Description
Trying to run an R script in a docker container that utilizes the TTR package. While installation of the package happens without any issues, the runtime faces an issue while loading the library.
I'm using multi-stage docker build where I am installing the R packages in the first base stage, copy the /usr/local/ path from the first stage to the final stage where I then re-install some dependencies like --
libreadline-dev gcc-7 g++-7 gfortran-7 libicu60 libhiredis-dev libcurl4-openssl-dev
This was done as some of the packages were having issues with these system dependencies. The error log I see is
However, by using dive, I check the file structure inside the docker image. I see that the
/usr/local/lib/R/library/curl/libs/curl.so
actually does exist.You can see from the screenshot above that the curl.so file exists (see right side file structure).
Why is it not able to load the file?
Expected behavior
Running
library(TTR)
shouldn't have caused any issues in the R session.Session Info
Running in Docker.
The first few lines of the logs include: