typegoose / mongodb-memory-server

Manage & spin up mongodb server binaries with zero(or slight) configuration for tests.
https://typegoose.github.io/mongodb-memory-server/
MIT License
2.56k stars 185 forks source link

Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" #869

Closed Sangyog10 closed 2 months ago

Sangyog10 commented 4 months ago

Versions

Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error: StdoutInstanceError: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" at MongoInstance.checkErrorInLine (/home/sangyog/Projects/MIcroservices/Ticket app/tickets/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:708:11) at MongoInstance.stderrHandler (/home/sangyog/Projects/MIcroservices/Ticket app/tickets/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:595:10) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Socket.Readable.push (node:internal/streams/readable:390:5) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

hasezoey commented 4 months ago

I do have "libcrypto.so.1.1" installed

if that error is present, then you either dont have it installed, or it is not available to be found. you can check with ldconfig -p | grep libcrypto.

Sangyog10 commented 4 months ago

I get the following result by running the given command: $ldconfig -p | grep libcrypto libcrypto.so.3 (libc6,x86-64) => /lib64/libcrypto.so.3 libcrypto.so.1.1 (libc6) => /lib/libcrypto.so.1.1 libcrypto.so (libc6,x86-64) => /lib64/libcrypto.so

hasezoey commented 4 months ago

if that is your output and you are not running mongodb-memory-server / the resulting started binary in a separate environment, i dont know what could be wrong with linking, maybe it would help to have the full debug log?

Yarkhan commented 3 months ago

Having this issue as well on a docker container. Using the image node:20-buster solved the issue for me.

mpsebastianvidiv commented 2 months ago

Same on Node 20.14.0

steven-supersolid commented 2 months ago

There is a similar issue on Debian 11 Bullseye https://github.com/nodejs/docker-node/issues/1916 (fixed by using an image that uses Buster as mentioned above) But not sure how that relates to Fedora 40 Did you try running the following, although the ldconfig may cover it?

whereis libcrypto.so.1.1
steven-supersolid commented 2 months ago

How did you solve this @Sangyog10? In case anyone finds this issue in the future

Sangyog10 commented 2 months ago

How did you solve this @Sangyog10? In case anyone finds this issue in the future

I could not solve this issue in fedora 40. So i switched to mint and everything is working fine. I guess the issue is with fedora 40

natlibfi-jonollil commented 6 days ago

Got it working by installing fedora 39 package dnf install https://nic.funet.fi/pub/Linux/mirrors/fedora/linux/releases/39/Everything/x86_64/os/Packages/o/openssl1.1-1.1.1q-5.fc39.x86_64.rpm