bufferutil: install fails at node-gyp rebuild stage
On trying to install ember-cli with: sudo npm install -g --unsafe-perms ember-cli
I get the build fails with the following:
bufferutil.target.mk:90: recipe for target ‘Release/obj.target/bufferutil/src/bufferutil.o’ failed
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory ‘/usr/lib/node_modules/ember-cli/node_modules/bufferutil/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.12.49-1-MANJARO
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /usr/lib/node_modules/ember-cli/node_modules/bufferutil
gyp ERR! node -v v4.1.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 3.12.49-1-MANJARO
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “-g” “–unsafe-perms” “ember-cli”
npm ERR! node v4.1.2
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! bufferutil@1.1.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.1.0 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/arkie/npm-debug.log
I tried reinstalling npm and node, to no effect. I tried running with both sudo and through su. I tried attaching the npm-debug.log, but it’s rejected by both GitHub and PasteBin, probably because it’s almost a Mb large.
Is there any further useful information I can supply?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 36 (2 by maintainers)
@Bugsbane : I feel your pain. It was mine as well. In my case (kubuntu) had to wipe out from synaptic all debs related to node or npm,and remove some gyp library, It seems you have a conflict with an older package that is getting in the way.
then while root (or sudo):
npm cache clean -f npm install -g n n stable npm install npm -g
This is what I did.
Hth,
R
tried
which got me past the bufferutil issue. to fix the next (similar) issue regarding utf-8-validate, i just upgraded node to the latest version using
sudo apt-get install nodejsI am running TeamCity builds on Ubuntu Server. The problem is that building randomly fails. When that happens, I don’t change anything, I just run the build once more and it passes. Then after a few days it crashes again. I rerun it. It passes.
My build config includes two websites with separate node_modules, and I see that while one of them succeeds and moves past node-gyp bufferutil, the build for the second website fails.
Here is an example of the log:
The succeeding build:
as you see, it just issues a warning and then continues.
But for the failing build (for example, the second website) the output differs when the failure occurs:
This time there are no warnings, it just fails with status 1 being thrown to the very top level of the build script.
I’m completely baffled by this, there are no changes whatsoever, I just hit the Run button for the failed build again and it succeeds with
npm WARN install:bufferutil@1.2.1 Exit status 1instead of full exit.What’s the reason of such random failures?
It resolved for me on Mac OS X 10.10.5 after uninstall and reinstall npm uninstall bufferutil npm install -g bufferutil
I’ve been seeing these errors on Windows for as long as I’ve been using node. I’ve tried installing many versions of Visual Studio, Visual Studio Tools for windows desktop, MSBuild, node-gyp, python, MINGW gcc, node (0.12, 4, 5), npm (2.x, 3.x), running npm installs with --msvs_version=(2012,2013,2015)… Nothing has fixed it.
Granted this is usually a side effect of npm trying to install optional dependencies, but its very annoying on Windows. It would be nice if there were a way for windows users to specify to always ignore these as optional dependencies on Windows boxes (e.g.
npm -g ignore bufferutil utf-8-validate), but that’s not yet an option.Best I’ve found is always using
npm install --no-optionalInstalling Python from https://www.python.org/downloads/ solved the issue for me.
Here’s my case what fixed it:
I used
nvmand had 7.2.1 installed.brew uninstall nvmnode,sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}brew install node@6Errors gone!I was able to reproduce this problem on OSX 10.11.6 when building a project that had a dependency of
"java": "^0.6.0"changing that to"java": ">=0.6.0"worked fine after installing Java 7 and/or Java 8 SDK.Thanks @siegmergius, upgrading from python 2.7.3 to python 2.7.12 fixed it for me
I was installing browser-sync and also received seemingly similar gyp-related error on Ubuntu 14.04. I then updated nodejs with https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
then npm to npm2 with
and the
gyp ERR! configure erroris gone.