未找到 sqlite3 ERR DLOPEN FAILED 版本“GLIBC_2.29”

sqlite3 ERR DLOPEN FAILED version `GLIBC_2.29' not found

我不知从哪里开始收到这个错误 我 google 做了很多但没有得到帮助

这工作正常,但可能在我设置 github 工作流程后 Codeql-analysis.yml。或者也许在我更新包之后 - 开始收到此错误。

    "sqlite": "^4.0.25",
    "sqlite3": "^5.0.2"

sqlite3 5.0.3 is latest version

错误:

node:internal/modules/cjs/loader:1183
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/dreamy/YouTube/Silenzio_Bruno/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/dreamy/YouTube/Silenzio_Bruno/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v17.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm: '8.7.0'
node: 'v17.9.0'

这是我迄今为止尝试的 google 解决方案

我昨天也遇到过这种情况。在我更新我的 Debian 系统后,如果发现 Debian 升级了 Bullseye 以包含 GLIBC 2.31:

https://packages.debian.org/bullseye/libc6-amd64

SQLITE3 模块页面解释了模块,包括静态链接的 pre-built 需要特定版本 GLIBC 的二进制文件:

https://www.npmjs.com/package/sqlite3(标题为预构建二进制文件的部分)

在模块自行更新之前,同一页面描述了使用主机系统的 sqlite3 安装从源代码进行编译。

对于 Debian Bullseye,我做了以下操作:

apt-get install sqlite3 libsqlite3-dev
npm install --build-from-source --sqlite=/usr/bin sqlite3

此后模块开始工作。我不太了解您的环境以及这对您来说实施起来有多容易。我怀疑如果您检查主机系统上的 GLIBC 版本,您最近也有更改。