1

I'm trying to install ZeroMQ v5 through npm install zeromq@5 on a MacOS 11.5.2, but I'm getting the errors from below:

Other specs: Node v16.2.0 - Python 2.7.16 - node-gyp v3.8.0

npm ERR! code 1
npm ERR! command failed
npm ERR! command sh -c node-gyp-build || npm run build:libzmq
npm ERR! > zeromq@5.2.8 build:libzmq
npm ERR! > node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.2.0 | darwin | x64
npm ERR! (node:1703) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2.7
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. 
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit 
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.2.0 | darwin | x64
npm ERR! (node:1724) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2.7
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/cdgmachado/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/cdgmachado/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

Any ideas?

Thanks!

user3666197
  • 1
  • 6
  • 50
  • 92
dNyrM
  • 545
  • 1
  • 4
  • 17
  • `No Xcode or CLT version detected!` - I would assume it's looking for an Xcode or CLT installation, do you have either of them? – Dario Petrillo Dec 21 '21 at 19:05
  • I didn't and that could have been the problem. I ended up choosing another approach so I never got to the bottom of this @DarioPetrillo – dNyrM Dec 21 '21 at 22:45

2 Answers2

0

Q : Any ideas?

A :
Welcome to the ZeroMQ club.

The best next step is to contact the npm-package maintainer, showing the error-log and following their corrective actions for a due package installation.

user3666197
  • 1
  • 6
  • 50
  • 92
0

Make sure to have:

  1. Node.js 10+ or Electron 3+

  2. A working C++17 compiler toolchain with make

  3. Python 2.7 (or Python 3 with Node 12.13+)

  4. CMake 2.8+

  5. curl

    for debian linux

    $ apt-get install pkg-config cmake curl g++ python3 libzmq --yes

    for alpine linux

    $ apk add pkgconfig build-base cmake curl

    $ apk add --update --no-cache python3

    $ ln -sf python3 /usr/bin/python

Find relevant ways to download for your system. Add sudo if you are not in docker.

Turjoy Saha
  • 107
  • 1
  • 4