Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing with NPM #2617

Open
yuriploc opened this issue May 1, 2023 · 0 comments
Open

Error when installing with NPM #2617

yuriploc opened this issue May 1, 2023 · 0 comments

Comments

@yuriploc
Copy link

yuriploc commented May 1, 2023

Running on:

  • Ubuntu 22.04 LTS ARM 64
  • ARM 64 instance (Linux ubuntu-1 5.15.0-69-generic #76-Ubuntu SMP Fri Mar 17 17:25:19 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux)
sudo apt-get update && sudo apt-get -y install curl python3 git make g++
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
. ~/.bashrc
nvm install 14
npm install balena-cli --global --production --unsafe-perm

Expected Behavior

NPM installation to succeed.

Actual Behavior

gyp: Call to 'sh liblzma-config.sh "/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/build" "/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 2 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.15.0-69-generic
gyp ERR! command "/root/.nvm/versions/node/v14.21.3/bin/node" "/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64/lzma_native.node" "--module_name=lzma_native" "--module_path=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/versions/node/v14.21.3/bin/node /root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64/lzma_native.node --module_name=lzma_native --module_path=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Linux 5.15.0-69-generic
node-pre-gyp ERR! command "/root/.nvm/versions/node/v14.21.3/bin/node" "/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native
node-pre-gyp ERR! node -v v14.21.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/root/.nvm/versions/node/v14.21.3/bin/node /root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64/lzma_native.node --module_name=lzma_native --module_path=/root/.nvm/versions/node/v14.21.3/lib/node_modules/balena-cli/node_modules/lzma-native/binding-v6.0.1-n-api-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/balena-cli/node_modules/winusb-driver-generator):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/balena-cli/node_modules/macmount):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/balena-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build && rimraf build`
npm ERR! Exit status 1

Steps to Reproduce the Problem

sudo apt-get update && sudo apt-get -y install curl python3 git make g++
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
. ~/.bashrc
nvm install 14
npm install balena-cli --global --production --unsafe-perm

Specifications

  • balena CLI version: trying to install latest
  • Cloud backend: -
  • Operating system version: Ubuntu 22.04 LTS 64 bit
  • 32/64 bit OS and processor: 64-bit ARM
  • Install method: npm
  • If npm install, Node.js and npm version: Node v14.21.3, NPM 6.14.18
  • g++: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

Additional References

Following the CLI Advanced Installation Options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant