Repository navigation
ERR! Pre-built binaries not found for nodegit@0.22.2 and node@10.3.0 #1536
Copy link
Copy link
Closed
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
ylecuyer commentedon Aug 17, 2018
#1534
Paimard commentedon Aug 30, 2018
same problem
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodegit@0.22.2 install:
node lifecycleScripts/preinstall && node lifecycleScripts/installnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.22.2 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! /var/root/.npm/_logs/2018-08-30T19_48_27_915Z-debug.log
jaywcjlove commentedon Sep 3, 2018
@ylecuyer same problem
10.13.6jaywcjlove commentedon Sep 3, 2018
nailed it. It can be installed successfully through
yarn.maxkorp commentedon Sep 4, 2018
Node 10 is currently not supported, but work is underway. See here: #1490
This will be resolved when node 10 is supported
jaywcjlove commentedon Sep 5, 2018
I am getting an error in
node.js v8.11.4@maxkorpdvakatsiienko commentedon Sep 21, 2018
same with
node v8.12.0maxkorp commentedon Sep 21, 2018
Thats a good enough reason for me!
maxkorp commentedon Sep 21, 2018
I'll look at this in a few hours 👍
dvakatsiienko commentedon Sep 21, 2018
thanx @maxkorp !
just in case:
it happens when →
npm installbut it is okay when →
yarn addmacOS 10.13.6 (with freshly installed
sudo xcode-select --install)maxkorp commentedon Sep 21, 2018
Can somebody who can repro the issue clone nodegit and run the following and give me the output?
CC @dvakatsiienko @jaywcjlove
maxkorp commentedon Sep 21, 2018
Whhhooops seems like I might have found somethingEdit: Nope
dvakatsiienko commentedon Sep 22, 2018
@maxkorp on it
8 remaining items
dvakatsiienko commentedon Sep 26, 2018
@maxkorp
I've installed clean
macOS Sierra 10.13.6andxcode-select --installon virtual machine withNode v8.12.0.Now I clearly see this problem when
npm install nodegit:Then executed again:
Which gave me the following:
P.S.: I'm not sure if it is the case but tried to
brew install libgcryptwhich fixesNo crypto library found!error, but it did not fixed an issue withconfigure: error: cannot guess build type; you must specify one.dvakatsiienko commentedon Sep 26, 2018
@maxkorp Here is the output of
npm install nodegit --verbosein a clean directory on the same virtual machine:maxkorp commentedon Sep 28, 2018
I mean thats a step deeper. That's after it's already failed to find the binary, and is trying to build. Why the hell isn't it finding the binary?
maxkorp commentedon Sep 28, 2018
Oh goddamnit, libssh2 configure runs before node-pre-gyp >.<
Ughhhhhhhhhhhhhhhhhhhh
Can you, in the same shell, run
mkdir -p /Users/test/nodegit-test/node_modules/nodegit/somedir? You're getting some sort of permissions error it looks like?Edit: Oh shit, updated to Mojave and I'm getting this now too.
That is... useful, if heartbreaking.
maxkorp commentedon Sep 28, 2018
Oh goddamnit. Ye olde "using your system openssl headers the first time around to configure libssh until you build openssl then it will use it the next time around but at that point you've already built" bug strikes again!
Try this (without libgcrypt installed)
maxkorp commentedon Sep 28, 2018
We really gotta figure out how to
A) Run node-pre-gyp before libssh2 configures
B) link to the node openssl when appropriate
C) Build openssl before libssh2 configures
A) Seems trivial, but post npm2 you cannot run npm install (to get the dev dependencies) from within your npm install script.
B) This seems underway, although maybe with a good enough setup for C is not necessary
C and also a bit of A) I had previously started breaking openssl into it's own "nodegitopenssl" package, which is just like, a package.json and a dummy js file combined with the openssl stuff bundled into a linkable lib. I dunno how tennable that is though.
Alternately, we might have to stop building openssl using node-gyp. Or, ideally, in node-gyp if there is a way to make openssl build first, then run a script (in this case the libssh2 configure), then build libssh2, then everything else. I might die of happiness and hatred if it turns out that it's an ordering problem.
emmax86 commentedon Oct 15, 2018
@maxkorp If my understanding of the build process is correct, the changes that landed in #1545 should solve A. We've alleviated the issues with B and C by providing prebuilt OpenSSL binaries for non-Node builds.
TimOwe commentedon Oct 16, 2018
Having this issue now:
emmax86 commentedon Oct 17, 2018
@TimOwe Could you try installing the prerelease for 0.23.0 (semver
0.23.0-alpha.1)?node-gypseems to be dying in theconfigurestep. The aforementioned PR (#1545) made some dramatic fixes to theconfigurestep, but it hasn't landed in a mainline release yet.emmax86 commentedon Oct 17, 2018
FWIW it may be an entirely different issue. The others in this thread were dying at the
Configuring libssh2step. This step isn't run on Windows at all (as an aside, this is slated to change in #1569), and it certainly runs beforenode-gyp configurefires.TimOwe commentedon Oct 17, 2018
Seems like this was the case. Weird firewall rules I was unaware of have been messing with NPM. Sorted for now!
implausible commentedon Oct 17, 2018
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.
DerZyklop commentedon Feb 3, 2022
Have this issue on
Possible workaround i found:
ianhattendorf commentedon Feb 10, 2022
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 #1840 (comment) regarding prebuilts for Node 16.