I'm trying to install npm lame on a raspberry pi 0. I've googled everything but keep getting this error:
Not really sure what else to do.
pi#raspberrypi:~/twotone $ sudo npm install lame
> lame#1.2.4 install /home/pi/twotone/node_modules/lame
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/twotone/node_modules/lame/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/twotone/node_modules/lame/.node-gyp'
gyp ERR! System Linux 4.14.79+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/twotone/node_modules/lame
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN twotone#1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lame#1.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lame#1.2.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-06T22_12_04_380Z-debug.log
You might have to add --unsafe-perm to the npm install command
Related
Node: 12.6.0,
Npm:6.10.1,
Ubuntu: 19.04
I got this huge error when I run
npm i <package-name> Error Link https://textsaver.flap.tv/lists/2s4g
When I include sudo sudo i <package-name> I got this error
usama#usama:~/Learn/back-end/advance-nodejs/section two$ sudo npm i webworker-threads
> webworker-threads#0.7.17 install /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads/build'
gyp ERR! System Linux 5.0.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! not ok
npm WARN section-two#1.0.0 No description
npm WARN section-two#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webworker-threads#0.7.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads#0.7.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/usama/.npm/_logs/2019-07-13T15_25_15_922Z-debug.log
usama#usama:~/Learn/back-end/advance-nodejs/section two$
Using yarn instead of npm solve the issue.
Actually I am trying to install express-basic-auth, but it fails due to the installation of scrypt#6.0.3. I already tried:
sudo apt-get install build-essential
and also tried deleting ~/.node-gyp as stated here: https://github.com/nodejs/node-gyp/issues/809, but none of the suggestions helped. I still get the same error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/a/b/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/a/b/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN b#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-12-30T20_52_24_060Z-debug.log
Can anybody help?
I solved this problem by installing an earlier version of node locally, in my case the node 8.10.0 version. I stopped getting the same error you are getting here. Delete your node modules and package-lock.json then run
npm install --save node#earlierversion
npm install rest of packages
That's what I did to rebuild my node modules and prevent this error.
hdf5#0.3.3 install /usr/local/lib/node_modules/hdf5
node-gyp rebuild --jobs max
gyp ERR! configure error gyp ERR! stack Error: EACCES: permission
denied, mkdir '/usr/local/lib/node_modules/hdf5/build' gyp ERR! System
Darwin 17.7.0 gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" "--jobs" "max" gyp ERR! cwd /usr/local/lib/node_modules/hdf5
gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hdf5#0.3.3 install:
node-gyp rebuild --jobs max npm ERR! Exit status 1 npm ERR! npm ERR!
Failed at the hdf5#0.3.3 install script. npm ERR! This is probably not
a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/abc/.npm/_logs/2018-07-20T21_24_19_576Z-debug.log
Your error clearly says: Error: EACCES: permission denied, mkdir which is a permissions issue. Looks likes it trying to create directory called build inside /usr/local/lib/node_modules/hdf5/.
To fix it, just run the same command with sudo at the beginning.
But, I would not recommend it unless you install global package.
Do you try to install a local package ? if so, make sure the permissions of the node_modules is not root. If it does, either chown it or remove it and do npm install with non-root user.
I am trying to install a printer module for node on a lubuntu system, but making the npm installation, I get this:
gyp: Call to 'cups-config --libs' returned exit status 127. 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 (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-23-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/puesto1/app/node_modules/printer
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! printer#0.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the printer#0.1.1 install script.
npm ERR! This is most likely a problem with the printer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls printer
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/puesto1/app
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/puesto1/app/npm-debug.log
npm ERR! not ok code 0
It is a recently installed lubuntu, and I donĀ“t know what to do. Any suggestion to solve the problem?? Any other module to print??
Thank you.
I think node-gyp is not up to date in your system and also cups-config is not installed, try to re-install node-gyp using apt-get with this command : sudo apt-get install node-gyp and install cups-config using command : sudo apt-get install libcups2-dev
I'm trying to install zeromq.node using:
$ npm install zmq
However, I keep getting the error below. Any help would be much appreciated.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Linux 3.2.0-29-generic
gyp ERR! command "node" "/usr/share/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/robot/code/game/node_modules/zmq
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
npm ERR! zmq#2.1.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the zmq#2.1.0 install script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-29-generic
npm ERR! command "nodejs" "/usr/bin/npm" "install" "zmq"
npm ERR! cwd /home/robot/code/game/test/amqp
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/robot/code/game/test/amqp/npm-debug.log
npm ERR! not ok code 0
gyp bulid error removed libzmq dev and its dependencies and tried below steps..it worked for me
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install libzmq-dev
$ npm install zmq
I managed to solve this by following this tutorial for installing the python-client. After completing each of the steps I found I was then able to install the node.zeromq module through npm using:
$ npm install zmq
I'm guessing this is due to missing some of the required files. Most likely libzmq-dev.