nodegit: ERR! Pre-built binaries not found for nodegit@0.22.2 and node@10.3.0

I got this error when I tried to install using Ubuntu

npm install nodegit --save

> nodegit@0.22.2 install /home/bruno/workspace/git-consume/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
[nodegit] Running install script
node-pre-gyp
ERR! Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.22.2-node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for nodegit@0.22.2 and node@10.3.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp
ERR! Tried to download(undefined): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.22.2-node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for nodegit@0.22.2 and node@10.3.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/bruno/workspace/git-consume/node_modules/nodegit/build'
make: Entering directory '/home/bruno/workspace/git-consume/node_modules/nodegit/build'
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/annotated_commit.o
  CC(target) Release/obj.target/libgit2/vendor/libgit2/src/annotated_commit.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/apply.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/apply.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/attr_file.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/attr_file.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/attr.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/attr.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/attrcache.o
sed: can't read ./Release/.deps/Release/obj.target/libgit2/vendor/libgit2/src/attr.o.d.raw: No such file or directory
rm: cannot remove './Release/.deps/Release/obj.target/libgit2/vendor/libgit2/src/attr.o.d.raw': No such file or directory
make: *** [Release/obj.target/libgit2/vendor/libgit2/src/attr.o] Error 1
vendor/libgit2.target.mk:282: recipe for target 'Release/obj.target/libgit2/vendor/libgit2/src/attr.o' failed
make: Leaving directory '/home/bruno/workspace/git-consume/node_modules/nodegit/build'
gyp

ERR! build error
gyp
ERR! stack
Error: `make` failed with exit code: 2
gyp ERR! stack
at ChildProcess.onExit (/home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack
at ChildProcess.emit (events.js:182:13)
gyp ERR! stack
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp
ERR! System Linux 4.15.0-30-generic
gyp
ERR! command "/home/bruno/.nvm/versions/node/v10.3.0/bin/node" "/home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release"
gyp ERR! cwd /home/bruno/workspace/git-consume/node_modules/nodegit
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v
v3.7.0
gyp ERR! not ok

node-pre-gyp
ERR! build error
node-pre-gyp
ERR! stack Error: Failed to execute '/home/bruno/.nvm/versions/node/v10.3.0/bin/node /home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release' (1)
node-pre-gyp ERR!
stack     at ChildProcess.<anonymous> (/home/bruno/workspace/git-consume/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR!
stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR!
stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp
ERR! System Linux 4.15.0-30-generic
node-pre-gyp ERR!
command "/home/bruno/.nvm/versions/node/v10.3.0/bin/node" "/home/bruno/workspace/git-consume/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/bruno/workspace/git-consume/node_modules/nodegit
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR!
node-pre-gyp -v v0.6.39
node-pre-gyp ERR!
not ok
Failed to execute '/home/bruno/.nvm/versions/node/v10.3.0/bin/node /home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release' (1)
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/blame_git.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/blame.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/blob.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/branch.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/buf_text.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/buffer.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/cache.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/checkout.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/cherrypick.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/clone.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/commit_list.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/commit.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/config_cache.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/config_file.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/config_parse.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/config.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/crlf.o
CC(target) Release/obj.target/libgit2/vendor/libgit2/src/streams/curl.o
../vendor/libgit2/src/streams/curl.c:12:23: fatal error: curl/curl.h: No such file or directory
compilation terminated.
vendor/libgit2.target.mk:282: recipe for target 'Release/obj.target/libgit2/vendor/libgit2/src/streams/curl.o' failed
make: Leaving directory '/home/bruno/workspace/git-consume/node_modules/nodegit/build'
make: *** [Release/obj.target/libgit2/vendor/libgit2/src/streams/curl.o] Error 1
gyp

ERR! build error
gyp
ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp
ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp
ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR!
System Linux 4.15.0-30-generic
gyp ERR! command "/home/bruno/.nvm/versions/node/v10.3.0/bin/node" "/home/bruno/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/home/bruno/workspace/git-consume/node_modules/nodegit/build/Release"
gyp ERR! cwd /home/bruno/workspace/git-consume/node_modules/nodegit
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v
v3.7.0
gyp ERR!
not ok
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1
npm WARN git-consume@1.0.0 No description

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 35 (4 by maintainers)

Most upvoted comments

FWIW it may be an entirely different issue.

Seems like this was the case. Weird firewall rules I was unaware of have been messing with NPM. Sorted for now!

nvm use 12 npm install nodegit nvm use 16

That is unlikely to work, or if it does it will have sporadic issues, as the native bindings are different for each version of node.

See https://github.com/nodegit/nodegit/issues/1840#issuecomment-1035500925 regarding prebuilts for Node 16.

I’m closing this because there are no prebuilts for 0.22.0 for node 10.3 and won’t be due to compatibility issues. The solution is more than likely to upgrade to 0.23.0-alpha.1 or higher.

FWIW it may be an entirely different issue. The others in this thread were dying at the Configuring libssh2 step. This step isn’t run on Windows at all (as an aside, this is slated to change in #1569), and it certainly runs before node-gyp configure fires.

I’ll look at this in a few hours 👍

node -v
v8.11.4

I am getting an error in node.js v8.11.4 @maxkorp