Query engine exited with code 127 /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
See original GitHub issueBug description
Hello. I’m getting the following error when I’m trying to use Prisma client in a ts file.
{
"level": 30,
"time": 1628723419319,
"stack": "Error: Query engine exited with code 127 /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory at cb (/app/node_modules/@prisma/client/runtime/index.js:34806:17) at processTicksAndRejections (internal/process/task_queues.js:95:5)",
"type": "Error",
"msg": "Query engine exited with code 127 /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory"
}
I saw a similar issue https://github.com/prisma/prisma/issues/4741. But the solution/suggestion mention in this issue is not working for me. Please look into this issue.
How to reproduce
npx prisma generate
- Docker container is giving me the above error after the startup.
Docker file contents:
# Define Base
FROM node:14-buster-slim AS base
# Build
FROM base as build
ADD ./prisma /app
ADD ./.env.example /app
WORKDIR /app
RUN apt-get update && apt-get install -y openssl
RUN yarn install --frozen-lockfile
RUN yarn build
RUN yarn install --frozen-lockfile --prod
# Trim down image
FROM node:14-buster-slim AS release
# Add Tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
USER node
ENTRYPOINT ["/tini", "--"]
# only copy what we need to run the app
COPY --from=build /app/dist /app/dist
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/.env.example /app/.env.example
ENV NODE_ENV=production
ENV BUNDLE_ENV=production
WORKDIR /app
CMD ["node", "-r", "dotenv-azure/config-safe", "dist/index.js"]
Expected behavior
Prisma Client should not give any errors.
Prisma information
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-1.1.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Content {
id Int @id
title String
url String
thumbnailUrl String? @map("thumbnail_url")
publishedAt String @db.VarChar(36) @map("published_at")
@@map("content")
}
Environment & setup
- OS: Debian
- Database: PostgreSQL
- Node.js version: v14.16.0
Prisma Version
prisma : 2.28.0
@prisma/client : 2.28.0
Current platform : debian-openssl-1.1.x
Query Engine : query-engine 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine : migration-engine-cli 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 89facabd0366f63911d089156a7a70125bfbcd27
Studio : 0.417.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
error while loading shared libraries: libssl.so.1.1: cannot open ...
error while loading shared libraries : libssl.so.1.1: cannot open shared object file: No such file or directory.
Read more >Ubuntu 22.04 | libssl.so.1.1: cannot open shared object file
This fixes it (a problem with packaging in 22.04):
Read more >How do I fix error while loading shared libraries Libssl.so.1.1
m.n (where m,n are not both 1). Go to /usr/lib and make a symlink called libssl.so.1.1 to the libssl.so that you have: cd ......
Read more >imx8: imx-boot do_compile failing while building bsp 5.4
Hi ./mkimage_uboot: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory I think ...
Read more >error while loading shared libraries: libssl.so.1.1 - Reddit
1.1 : cannot open shared object file: No such file or directory. Hi after upgrading my OS today I got /usr/bin/paru ...
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
In my original docker file (available in the description of this issue), I have used a base image for trimming down my image as follows. This image needs to have openssl as a dependency.
The following docker file solves my issue.
Nice, that is always great if problems go away by itself 😄
Can you let us (and Google) know what needed to be changed? Maybe it can help others in the future that are hitting a similar problem.