./guard-server: error while loading shared libraries: libmysqlclient.so.21: cannot open shared object file: No such file or directory #4211
Unanswered
oracularhades
asked this question in
Q&A
Replies: 2 comments
-
Switching to an Ubuntu docker image fixed this - is this a compatibility bug? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would assume that this links against different versions of libmysqlclient. You need to use the same version in both environments (compilation/runtime) or statically link it at build time (e.g. via the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This bug is absolutely doing my head in.
Here is my release github action, which builds the release: https://github.com/oracularhades/guard/blob/main/.github/workflows/rust.yml
Here is the example Dockerfile I'm installing Guard to: https://github.com/oracularhades/mindmap/blob/debugging-files/server/Dockerfile-test
(please excuse any mess, I have been debugging this for hours. This error message is really not clear, even when I know it's some sort of missing library issue).
I recently switched all my code from Rocket's integration with Diesel to native Diesel. Rocket seems to have quietly dropped Diesel support, which was incredibly frustrating. After moving, my code works fine. All my other projects compile/run fine and Guard (the project with the missing dependency) runs fine in it's own docker container.
For some reason, when Guard isn't running within it's own Docker container and instead the binary is downloaded and run within the "Mindmap" container, it causes this missing library error. This is odd because "Mindmap" doesn't compile within the same Docker state and still works fine when separated from the environment it was built in, yet somehow Guard errors. There are no apt package differences between the 2 Dockerfiles (I even installed more for debugging) and both Dockerfiles have the same base image.
Any help is appreciated, thanks.
Beta Was this translation helpful? Give feedback.
All reactions