Error loading shared library ld-linux-x86-64.so.2: No such file or directory
See original GitHub issueHow frequently does the bug occur?
All the time
Description
It was working on with all the same server setup but it’s started giving this error when we tried to deployed this on production. dev and production both are having same configuration with OS ubuntu. I almost spent 3 days and tried everything to fix it. linux-x86-64.so.2 is already available on /usr/lib64 but still giving the error however on dev it’s working fine. Please help.
Stacktrace & log output
ERROR Error in phase start: Could not run init tasks: Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/src/app/node_modules/realm/build/Release/realm.node)
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.14
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Ubuntu 20
Build environment
NodeJs
Cocoapods version
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error loading shared library ld-linux-x86-64.so.2 on Alpine
#32 115.7 Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/src/app/node_modules/@next/swc- ...
Read more >lib64/ld-linux-x86-64.so.2: No such file or directory error
If the elasticsearch distribution you are trying to install is for x86_64, then it attempts to link to the x86-64-native ld.so, ...
Read more >Error loading shared library ld-linux-x86-64.so.2 - Julien Voisin
Error loading shared library ld-linux-x86-64.so.2: on Alpine Linux. Sat 04 April 2020 — download. Since I've encountered this issue so much, here is...
Read more >Error loading shared library ld-linux-x86-64.so.2 while running ...
This is a copy/paste of an issue opened on github at https://github.com/CNES/WASP/issues/11 Hello, I'm using WASP to get some cloud free...
Read more >Solving The “Cannot Open Shared Object File - Baeldung
In this tutorial, we'll go through various causes and fixes for the “cannot open shared object file: No such file or directory” error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We actually experienced the same problem when trying to build and run a Docker container of our node realm app.
The error ended up being that our container was built on
node:gallium-alpine
, and the alpine image either didn’t contain the required library or couldn’t find it. We tried also tried to usenode:gallium
, and that found the library, but gave a different error, namely:Basically, the version of glibc that node:16 ships wasn’t up-to-date enough.
The solution to all this ended up being to move to building our docker images using node 18. The alpine images still lacked the requisite lib, but using
FROM node:18-slim
solved our problem. 😄@Firanus , Thank you for the solution. I had the same problem (with node:16.14). Confirm that the fix works (move to 18-slim). Weird, since the 16.14 image is supposed to include the needed dependency.