Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MichaelJCole opened this issue Jan 15, 2023 · 6 comments

Comments

@MichaelJCole
Copy link

MichaelJCole commented Jan 15, 2023

Hi, cool project. I tried using it, but got an error. I googled for some ways to install libcrypto, but nothing worked. I'm using Ubuntu 22.04

Here's the error:

Determining test suites to run...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/michael/casefile/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:368:62)
    at MongoInstance.stderrHandler (/home/michael/casefile/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:290:14)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)


  ● Test suite failed to run

    Jest: Got error running globalSetup - /home/michael/casefile/node_modules/@shelf/jest-mongodb/lib/setup.js, reason: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"

      at MongoInstance.checkErrorInLine (../node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:368:62)
      at MongoInstance.stderrHandler (../node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:290:14)

This repo is a good reproduction of the libcrypto problem on Ubuntu 22.04. I tried changing the version to 5.0.14 and same-same.

https://github.com/renatops1991/clean-code-api

What am I missing?

I have mongo running in a docker instance - that would be so much easier and more secure to deploy than downloading the images - is that a possibility?

Thank you!

p.s. I cross posted here: https://www.mongodb.com/community/forums/t/jest-mongo-and-ubuntu-22-04/208722

@hasezoey
Copy link

this might be a duplicate of #351

@MichaelJCole
Copy link
Author

Mongo's support said Mongo 6 already supports Ubuntu, but the docs haven't been updated.

@borodedamie
Copy link

hi @MichaelJCole I know this issue is closed, but were you able to resolve the issue and how did you go about it? I am currently experiencing the same error using Ubuntu 22.04 on WSL 2. I have been able to install mongoDB successfully on the machine and libssl1.1 is installed on the machine as well, but I just can't get mongodb-memory-server to work. I am using version 8.12.2.

@hasezoey
Copy link

@borodedamie what is you exact error / issue?

@borodedamie
Copy link

@hasezoey "library is missing or cannot be opened: "libcrypto.so.1.1", so I downgraded my ubuntu from 22.04 to 18.04 and it works now. Thank you for the prompt response.

@MichaelJCole
Copy link
Author

Hi @borodedamie I gave up on this approach and use a mongodb cluster from a docker-compose.yaml file now. I also gave up on WSL2 after a bunch of frustration and went back to using Linux Mint which also saved some frustration. Anyways, hope you figure it out - best of luck to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants