Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
See original GitHub issueBug description
Error: Get Config: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
Details: Unable to require(`/home/florian/zac-management/node_modules/.pnpm/prisma@4.0.0/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node`)
libssl.so.1.1: cannot open shared object file: No such file or directory
How to reproduce
- run
next dev
andprisma generate
will cause the issue
Environment & setup
- OS: Ubuntu (WSL2)
- Database: MySQL (Planetscale)
- Node.js version: 16.15
Prisma Version
4.0.0
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:33 (6 by maintainers)
Top Results From Across the Web
Error: Get config: Unable to establish a connection to query ...
I face the same error with npm and yarn. I run all Prisma command. I start with a fresh supabase database. prisma migrate...
Read more >Joby Harding (@joby_h) / Twitter
Unable to establish a connection to query-engine-node-api library. It seems there is a problem with... I have a new laptop with ubuntu 22.04...
Read more >openssl - Rust - Docs.rs
Both OpenSSL libraries and headers are required to build this crate. There are multiple options available to locate OpenSSL. Vendored. If the vendored...
Read more >PostgreSQL connection errors in release_command - Fly.io
I'm getting a P1017 “Server has closed the connection” error. ... posts on here with similar issues, but it doesn't seem like there...
Read more >Fly.ioでのデプロイの際のエラーについて - Shopify Community
Error : Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
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 FreeTop 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
Top GitHub Comments
For @victorkurauchi and others getting this issue on Alpine Linux (especially in Docker), this comment in another issue pointed out that the latest Alpine strips out legacy OpenSSL APIs. This caused this issue to start occurring for me recently. I was able to fix it without downgrading or cross-grading to bullseye or buster by adding this line to my dockerfile before the
npm install
command:RUN apk add --update --no-cache openssl1.1-compat
If any of you still having this issue are using Homebrew on your machine, I found out through some very annoying debugging that apparently Homebrew had a higher precedence on my $PATH, and since I had installed other programs with it that depended on the OpenSSL 1.1 binary, my system was defaulting to that as the binary to use for OpenSSL instead of the default installed binary by Ubuntu (in my case Pop OS, a derivative of Ubuntu) in /usr/bin/openssl. Try running
openssl version
and if you get backOpenSSL 1.1.1p 21 Jun 2022
or something with1.x
in it, that may be your issue. By making sure that/usr/bin
had precedence in my $PATH over my Homebrew install, my system used the proper binaries installed byapt
(openssl
,libssl-dev
, andlibc6
). Very niche issue, but hope this might help save someone else 1+ hours of digging 😅. All of this was total user error as the way I had added Homebrew to my $PATH was not what I intended, so I mistakenly had given it higher precedence over all my default /usr system folders.TLDR check and see if you have any other versions of OpenSSL installed on your system as a peer-dependency via something like Homebrew or another package manager, and make sure that version of OpenSSL is on version 3 or is not taking precedence over your system package manager’s version of OpenSSL