prisma: Alpine Linux 3.21: `Prisma failed to detect the libssl/openssl version to use`

Bug description

When attempting to run a Prisma client within an Alpine 3.21 Docker image, a warning related to the libssl/openssl version is shown and the application fails to start:

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.

PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "linux-musl-arm64-openssl-1.1.x".

How to reproduce

docker run --rm -it alpine
apk add nodejs npm
npx prisma init

Expected behavior

No warnings. Clients do not throw errors.

Prisma information

// Add your schema.prisma
// Add your code using Prisma Client

Environment & setup

  • OS: Alpine Linux v3.21
  • Database: N/A
  • Node.js version: 22

Prisma Version

/ # npx prisma -v
prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Environment variables loaded from .env
prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Error: Unable to require(`/root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node`).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: Error loading shared library libssl.so.1.1: No such file or directory (needed by /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node)
    at gne (/root/.npm/_npx/2778af9cee32ff87/node_modules/prisma/build/index.js:284:116)
    at DWe (/root/.npm/_npx/2778af9cee32ff87/node_modules/prisma/build/index.js:284:269)
Error: Command failed with exit code 127: /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x --version
Error loading shared library libssl.so.1.1: No such file or directory (needed by /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x)
Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x)
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_create: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: TLS_method: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_value: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_default_verify_paths: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_reason_error_string: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_write: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_rbio: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_puts: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_cipher_list: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: CRYPTO_get_ex_new_index: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_use_certificate: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_func_error_string: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OBJ_obj2nid: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_digest: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_VERIFY_PARAM_set1_ip: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_pop: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_write: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_ALGOR_get0: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: EVP_get_digestbyname: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_is_server: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_state_string_long: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_ctrl: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_STORE_new: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_get_error_line_data: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OpenSSL_version_num: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_new: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_get_data: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_cert_store: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OBJ_find_sigid_algs: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_read: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_new: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_use_PrivateKey: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_get0_signature: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_get_cert_store: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_do_handshake: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_read: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_set_init: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_new_mem_buf: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_options: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_ctrl: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_STORE_add_cert: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: d2i_PKCS12: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_connect: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_up_ref: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_new: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_free_all: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_clear_flags: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_peer_certificate: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_verify_result: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_up_ref: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_init_ssl: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_VERIFY_PARAM_set_hostflags: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_shutdown: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_set_flags: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_set_bio: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_verify_cert_error_string: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_destroy: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_certificate: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: EVP_PKEY_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: PEM_read_bio_X509: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_ctrl: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_new: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_set_data: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OBJ_nid2sn: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get0_param: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_num: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: EVP_sha256: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_ex_data: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: d2i_X509: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_set_verify: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_error: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: PKCS12_parse: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_set_ex_data: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_lib_error_string: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: PKCS12_free: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_verify: symbol not found
Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_VERIFY_PARAM_set1_host: symbol not found
    at mke (/root/.npm/_npx/2778af9cee32ff87/node_modules/prisma/build/index.js:5:57)
    at /root/.npm/_npx/2778af9cee32ff87/node_modules/prisma/build/index.js:5:10625
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async DWe (/root/.npm/_npx/2778af9cee32ff87/node_modules/prisma/build/index.js:284:343) {
  shortMessage: 'Command failed with exit code 127: /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x --version',
  command: '/root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x --version',
  escapedCommand: '"/root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x" --version',
  exitCode: 127,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'Error loading shared library libssl.so.1.1: No such file or directory (needed by /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x)\n' +
    'Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x)\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_create: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: TLS_method: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_value: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_default_verify_paths: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_reason_error_string: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_write: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_rbio: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_puts: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_cipher_list: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_free: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: CRYPTO_get_ex_new_index: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_use_certificate: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_func_error_string: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OBJ_obj2nid: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_digest: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_VERIFY_PARAM_set1_ip: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_sk_pop: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_write: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_ALGOR_get0: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: EVP_get_digestbyname: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_is_server: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_state_string_long: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_ctrl: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_STORE_new: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: ERR_get_error_line_data: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OpenSSL_version_num: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_new: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_get_data: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_cert_store: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OBJ_find_sigid_algs: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_read: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_new: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_use_PrivateKey: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_get0_signature: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_get_cert_store: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_do_handshake: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_read: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_set_init: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_new_mem_buf: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_CTX_set_options: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_ctrl: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_STORE_add_cert: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: d2i_PKCS12: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_connect: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_up_ref: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_free: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_free: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_new: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_free_all: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_clear_flags: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_peer_certificate: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_get_verify_result: symbol not found\n' +
    'Error relocating /root/.npm/
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: OPENSSL_init_ssl: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_VERIFY_PARAM_set_hostflags: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_shutdown: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_set_flags: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: SSL_set_bio: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: X509_verify_cert_error_string: symbol not found\n' +
    'Error relocating /root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x: BIO_meth_set_destroy: symb'... 3485 more characters,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
prisma                  : 6.0.1
@prisma/client          : Not found
Computed binaryTarget   : linux-musl-arm64-openssl-1.1.x
Operating System        : linux
Architecture            : arm64
Node.js                 : v22.11.0
Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node)
Schema Engine           : E_CANNOT_RESOLVE_VERSION (at root/.npm/_npx/2778af9cee32ff87/node_modules/@prisma/engines/schema-engine-linux-musl-arm64-openssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e
Default Engines Hash    : 5dbef10bdbfb579e07d35cc85fb1518d357cb99e
Studio                  : 0.503.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 51
  • Comments: 26 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Filed https://github.com/nodejs/docker-node/issues/2175

I think this probably should be fixed either here or over at Alpine, i.e. one of the below needs to happen

  • Prisma should look for libssl in /usr/lib
  • Alpine should put a symlink to libssl in /lib

Here’s what I wrote in the above issue:

FYI, since I ran into the same issue today, it occurs with node:20-alpine3.21 but not with node:20-alpine3.20, and the reason is not that the former doesn’t have OpenSSL, it’s that the library is stored in a different location.

Specifically, in 3.20 it’s in /lib/libssl.so.3 but in 3.21 it’s in /usr/lib/libssl.so.3. (Actually 3.20 also has /usr/lib/libssl.so.3, but the point is that /lib/libssl.so.3 is what is needed).

So adding something like

RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3

to your Dockerfile also works.

(The release notes for Alpine 3.21 talk about moving some stuff to /usr so that’s probaly what’s going on)

Hey folks, Alberto from Prisma here. This issue arised due to a change in Alpine’s Docker images, specifically in how and where OpenSSL libraries are stored (and, consequently, detected by Prisma Engines).

Thanks to https://github.com/prisma/prisma/pull/25824, this issue is now solved. This fix will be shipped in Prisma 6.1.0 on December 17th, and is already available in Prisma 6.1.0-dev.14.

Have the same issue, adding the following to the Dockerfile to install openssl works but I want to know what is the correct/official solution?

RUN apk update \
	&& apk add --no-cache openssl\
	&& rm -rf /var/lib/apt/lists/* \
	&& rm -rf /var/cache/apk/*

6.1.0 appears to resolve the issue! Thank you

Seeing this as well. I am working around by using base image node:18-alpine3.20. Looks like 3.20 suffix is available for most node versions.

Might be worth letting the authors of node docker images know? I wonder if this will affect other projects. This shipped hours ago today: https://github.com/nodejs/docker-node/pull/2174

If you are okay with running an old version of prisma, you can also run an old alpine image, no? There are also a few different workarounds already posted in this thread, I don’t think a backport is necessary.

Just a note, that whilst pinning to an older version might be a viable workaround, that image has a mid severity libssl vulnerability… https://hub.docker.com/layers/library/node/18-alpine3.20/images/sha256-7000d2e73f938c4f62fdda6d398d7dffd50e6c129409ae2b1a36ccebf9289ffe?context=repo

Do you plan on backporting this fix to the 5.x branch as well?

Will the fix for this be backported to older major versions of Prisma? Or do we need to migrate to Prisma 6 to keep using up to date docker images?

Hello @jkomyno I added the 6.1.0-dev.14 on my package.json, changed the version on dockerfile to node:22.12-alpine and I am still getting this issue. Do you have an idea where can be? I am currently using Prisma on a Monorepo with Turborepo.

this are the binaryTargets I am using: binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]

Seeing this as well. I am working around by using base image node:18-alpine3.20. Looks like 3.20 suffix is available for most node versions.

this fixed the issue for me! specifically in my case, i used node:20-alpine3.20.

thanks so much @TaxBusby, et al 👍

Any update for old evrsion also

We’re currently using prisma ^5.0.0. I had to specify the previous version of alpine. Using node:20-alpine3.20 worked with our Docker + AWS CDK ECS setup.

Any update for old evrsion also

If you need to use an older version of Prisma, don’t pin your docker base image to an old version of alpine (because of aforementioned security issues.)

Just add this before you run prisma generate

RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3

Filed nodejs/docker-node#2175

I think this probably should be fixed either here or over at Alpine, i.e. one of the below needs to happen

  • Prisma should look for libssl in /usr/lib
  • Alpine should put a symlink to libssl in /lib

Here’s what I wrote in the above issue:

FYI, since I ran into the same issue today, it occurs with node:20-alpine3.21 but not with node:20-alpine3.20, and the reason is not that the former doesn’t have OpenSSL, it’s that the library is stored in a different location. Specifically, in 3.20 it’s in /lib/libssl.so.3 but in 3.21 it’s in /usr/lib/libssl.so.3. (Actually 3.20 also has /usr/lib/libssl.so.3, but the point is that /lib/libssl.so.3 is what is needed). So adding something like

RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3

to your Dockerfile also works. (The release notes for Alpine 3.21 talk about moving some stuff to /usr so that’s probaly what’s going on)

It seems that the symlink /usr/lib/libssl.so.3 to /lib/libssl.so.3 is already provided. Therefore, adding a command to create this symlink manually in the Dockerfile shouldn’t be necessary. However, if this issue arises again, a simple check can ensure the symlink is created only if it doesn’t already exist:

RUN [ ! -e /lib/libssl.so.3 ] && ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3 || echo "Link already exists"

I have upgraded prisma to 6.1.0-dev.15, still no luck.

I am also using node:20-alpine in my Dockerfile. I tried specifying node:20-alpine3.20 to no avail.

I also previously tried including RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3, as well as RUN apk add --no-cache openssl in my Dockerfile to no avail.

My binaryTargets are ["native", "linux-musl-openssl-3.0.x"].

FWIW, my container is deployed on EC2 with ECS.

I know you are aware of the issue caused by the update to Alpine, and are working on a fix. I have tried all of the mitigations suggested above and elsewhere, and still my containers cannot run my recent migrations. Any other workarounds or fixes would be greatly appreciated, as this is a hard blocker for any production deployments right now.

@jkomyno

Hey folks, Alberto from Prisma here. This issue arised due to a change in Alpine’s Docker images, specifically in how and where OpenSSL libraries are stored (and, consequently, detected by Prisma Engines).

Thanks to #25824, this issue is now solved. This fix will be shipped in Prisma 6.1.0 on December 17th, and is already available in Prisma 6.1.0-dev.14.

Thanks for the updates @jkomyno .

Similarly to @ismaelpereira, I am still getting the error after upgrading to 6.1.0-dev.14

(Using node:20-alpine)

It seems that the symlink /usr/lib/libssl.so.3 to /lib/libssl.so.3 is already provided. Therefore, adding a command to create this symlink manually in the Dockerfile shouldn’t be necessary. However, if this issue arises again, a simple check can ensure the symlink is created only if it doesn’t already exist:

RUN [ ! -e /lib/libssl.so.3 ] && ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3 || echo "Link already exists"

I myself had to use the following, because my Dockerfile didn’t like the above :

image
RUN sh -c '[ ! -e /lib/libssl.so.3 ] && ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3 || echo "Link already exists"'

huge fuck up for a company like this. Costed us 2 clients (hospitals) today.

dude…

https://github.com/prisma/prisma/blob/be3eed5c89e3b643904ea31e75cf9eb34e71e6b5/LICENSE#L143-L151