Support OpenSSL 3.0 for Alpine Linux
See original GitHub issueOpenSSL 3.0 is currently the default OpenSSL version in Alpine Linux 3.17 (see CHANGELOG).
For Alpine Linux, Prisma only supports OpenSSL 1.X at this time.
As a result, the following error is generated:
Error: 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(`OMITTED/node_modules/prisma/libquery_engine-linux-musl.so.node`)
Error loading shared library libssl.so.1.1: No such file or directory (needed by OMITTED/node_modules/prisma/libquery_engine-linux-musl.so.node)
[Context: getDmmf]
Suggested solution
Add OpenSSL 3.0 support to Alpine Linux
Workaround
Install openssl1.1-compat:
apk add openssl1.1-compat
Note that this is only a temporary fix until the Prisma team adds support for OpenSSL 3.0.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:34
- Comments:30 (10 by maintainers)
Top Results From Across the Web
Alpine Linux 3.17 Released With OpenSSL 3.0, Better Rust ...
The other significant change noted with Alpine Linux 3.17 is Rust programming language support now being available on all architectures.
Read more >Alpine Linux 3.17 Officially Released with Full ... - 9to5Linux
Alpine Linux 3.17 distribution is now available for download with OpenSSL 3.0 as the default OpenSSL version, GNOME 43, and KDE Plasma 5.26....
Read more >openssl - Alpine Linux packages
Package, openssl. Version, 3.0.7-r1. Description, Toolkit for Transport Layer Security (TLS). Project, https://www.openssl.org/. License, Apache-2.0.
Read more >Alpine Linux 3.17 Released With Rust Support, OpenSSL 3.0 ...
Alpine Linux 3.17 comes with OpenSSL 3.0 as the default implementation and Rust support. Learn about what else it supports here.
Read more >Alpine Linux 3.17 Released: Uses OpenSSL 3.0, Better Rust ...
Alpine Linux 3.17 release is available today and the new version uses OpenSSL 3.0 as the default OpenSSL implementation.
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
Update: as of
prisma@4.8.0(released on December 20th 2022), the procedure below is no longer needed, as Prisma now supports OpenSSL 3 on Linux Alpine out of the box.Hey everyone, Alberto from Prisma here.
Prisma currently needs OpenSSL 1.1.x being installed as a system library on Linux Alpine. For many of you, Prisma suddenly stopped working when run on the
node:alpine/node:lts-alpineDocker images. This is because these images are now based onalpine:3.17(which comes with OpenSSL 3.0.x) rather thanalpine:3.16(which comes with OpenSSL 1.1.x).You currently have two alternatives:
Use a Node.js Docker image based on Alpine 3.16, like
node:alpine3.16,node:lts-alpine3.16,node:18.12.1-alpine3.16(encouraged)Install OpenSSL 1.1.x via the
openssl1.1-compatpackage, e.g., by addingto your Dockerfile before installing Prisma
We’re also working on a solution on our side to provide native compatibility with OpenSSL 3, which will close this issue altogether. We thank you for your patience.
About the original error listed at the top of this issue:
Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!means that Prisma cannot interact with its own engines (which are compiled libraries or binaries compatible), most likely due to Prisma not being able to find OpenSSL on your system.Error loading shared library libssl.so.1.1error indeed shows that Prisma cannot find OpenSSL 1.1 in the system, which prevents commands likeprisma generateand the Prisma Client from working as expected.Here is a minimal
Dockerfileexample based onnode:alpineyou can use to run Prisma!Notes:
libcon Linux Alpine to fix the problem. Please DON’T do this, as it could cause other unexpected errors.Support for OpenSSL 3 in Alpine Linux for x86_64 will be released today (CET) in Prisma 4.8.0. Please let us know if you still run into any issues with 4.8.0!