-
-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Labels
Description
Describe the bug
The ZeroMQ.js native addon fails to load on Ubuntu 22.04 with Node.js 18.20.7.
It tries to load a prebuilt binary linked against musl (libc.musl-x86_64.so.1
), which is unavailable on glibc-based systems like Ubuntu.
Reproducing
Steps to reproduce:
- On Ubuntu 22.04 with Node.js 18.20.7:
- Install
zeromq
v6.4.0 vianpm install zeromq
- Run a Node.js project with a simple import of
zeromq
- The following error appears:
Failed to load addon at /root/myproject/node_modules/zeromq/build/linux/x64/node/127/addon.node:
Error: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
I attempted a workaround by installing musl and symlinking:
apt install musl-dev
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
This leads to a different error:
Error: addon.node: undefined symbol: __cxa_call_terminate
Expected behavior
ZeroMQ.js should either:
- Provide a prebuilt binary linked against glibc for Linux,
- Or fall back to source build during
npm install
if no compatible binary is found.
Tested on
- OS: Ubuntu 22.04
- Node.js: 18.20.7
- ZeroMQ.js version: 6.4.0
SchahinRohani and Wayonb