Skip to content

Install of 5.0.9 fails to run on Alpine ("_ZSt28__throw_bad_array_new_lengthv: symbol not found") #1625

@tianon

Description

@tianon

Issue Summary

When installing on Alpine, the module installs correctly but then fails at runtime.

Relevant logs or output

$ docker run -it --rm --pull=always node:16-alpine3.15 sh
16-alpine3.15: Pulling from library/node
Digest: sha256:3cc4a16286bc01e141dcfec735f3ebfaf8bdb6ab7ff216f9a7073bd08cee1fa7
Status: Image is up to date for node:16-alpine3.15
/ # node --version
v16.16.0
/ # npm --version
8.11.0
/ # npm install -g sqlite3
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

added 104 packages, and audited 105 packages in 10s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 8.11.0 -> 8.14.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.14.0
npm notice Run npm install -g npm@8.14.0 to update!
npm notice 
/ # npm info sqlite3

sqlite3@5.0.9 | BSD-3-Clause | deps: 4 | versions: 92
Asynchronous, non-blocking SQLite3 bindings
https://github.com/TryGhost/node-sqlite3

keywords: sql, sqlite, sqlite3, database

dist
.tarball: https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.9.tgz
.shasum: 421b9c065480f1c589f89cabd6d0ea9575a69855
.integrity: sha512-e2lEKevUF65UJu4IIuuFytgW7yNMkmCkfyn66jXWeb7OcdHvRo7nXhF+IQ25iW6x2grB0DyKdGCpx8Rd8EkA2Q==
.unpackedSize: 3.2 MB

dependencies:
@mapbox/node-pre-gyp: ^1.0.0 node-addon-api: ^4.2.0       node-gyp: 8.x                tar: ^6.1.11                 

maintainers:
- springmeyer <dane.springmeyer@gmail.com>
- kkaefer <mail@kkaefer.com>
- tmcw <tom@macwright.com>
- erisds <github.erisds@gmail.com>
- yhahn <young@mapbox.com>
- mapsam <sam@mapbox.com>
- zmully <mully@mapbox.com>
- kewde_ <kewde@particl.io>
- daniellockyer <hi@daniellockyer.com>

dist-tags:
alpha: 3.1.10-alpha  latest: 5.0.9        

published 6 days ago by daniellockyer <hi@daniellockyer.com>
/var/lib/ghost # node -p 'require("sqlite3")'
node:internal/modules/cjs/loader:1189
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: Error relocating /var/lib/ghost/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node: _ZSt28__throw_bad_array_new_lengthv: symbol not found
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/var/lib/ghost/node_modules/sqlite3/lib/sqlite3-binding.js:4:17)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Version

5.0.9

Node.js Version

16.16.0

How did you install the library?

npm install sqlite3, yarn add sqlite3; Linux, x86_64, Alpine 3.15 (specifically, failing to update https://github.com/docker-library/ghost to Ghost 5.4.1; docker-library/ghost#320)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions