Skip to content

Can't install via NPM #1134

Closed
Closed

Description

@mitchellmorris

Am I missing something? Any tips how to get around this? It just started happening.

> [email protected] install /Users/superman/Sites/myproj/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ [Error: Command failed: /bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows
]
  killed: false,
  code: 1,
  signal: null,
  cmd: '/bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl' }
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

[nodegit] ERROR - Could not finish preinstall
{ [Error: Command failed: /bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows
]
  killed: false,
  code: 1,
  signal: null,
  cmd: '/bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl' }
[email protected] /Users/superman/Sites/myproj
└── (empty)

npm WARN EPACKAGEJSON [email protected] No repository field.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/Users/superman/npm/bin/npm" "install" "nodegit" "--save"
npm ERR! node v4.4.7
npm ERR! npm  v3.3.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node lifecycleScripts/preinstall && node lifecycleScripts/install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodegit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! You can get their info via:
npm ERR!     npm owner ls nodegit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/superman/Sites/myproj/npm-debug.log
npm ERR! code 1

Activity

  1. johnhaley81 commented on Sep 21, 2016

    @johnhaley81
    Collaborator

    Latest Xcode just straight up broke things all across the world. Try running sudo xcode-select --install and update the xcode CLT. That fixed it for me.

  2. mitchellmorris commented on Sep 21, 2016

    @mitchellmorris
    Author

    Thanks man!

  3. WORMSS commented on Sep 26, 2016

    @WORMSS

    What if you are getting the same error vendor/libssh2/missing: Unknown --is-lightweight' option but do not have xcode-select ??

  4. johnhaley81 commented on Sep 26, 2016

    @johnhaley81
    Collaborator

    @WORMSS are you on OSX?

  5. codecholeric commented on Oct 15, 2016

    @codecholeric

    Since this issue popped up first, when I searched for this error:
    On Ubuntu 16.04 this problem might be solved by sudo apt install libssl-dev (thanks to @n8behavior)
    See #728

  6. e-cloud commented on Nov 15, 2016

    @e-cloud

    I'm using Ubuntu 16.10, facing the same error. And @codecholeric 's solution works.

  7. danShumway commented on Nov 16, 2016

    @danShumway

    Should documentation be updated for this? Better yet, is there a node crypto library that nodegit could fall back on if libssl-dev isn't present?

  8. WORMSS commented on Nov 16, 2016

    @WORMSS

    @johnhaley81 no, I was using a Raspberry Pi..

    Sorry for big delay, I must have missed your reply.

  9. SkeLLLa commented on Nov 22, 2016

    @SkeLLLa

    Same bug on gentoo linux.

  10. romandecker commented on Nov 24, 2016

    @romandecker

    Happens for me as well on Mac OS Sierra 10.12.1. sudo xcode-select --install gives me:

    xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    

    App Store tells me XCode is up to date though.

  11. samiraguiar commented on Feb 11, 2017

    @samiraguiar

    @DEX3 just had this problem on Sierra. Had to uninstall node and homebrew, then reinstall homebrew, install node from brew and it worked.

  12. malko commented on Mar 2, 2017

    @malko
    Contributor

    installing libssl-dev on ubuntu 16.10 also solved problem for me.

  13. jimCresswell commented on Apr 12, 2017

    @jimCresswell
    Contributor

    I want to use NodeGit to build an application that people can install with Docker or npm -g. That's not going to work in all cases if people need to install extra libraries. As @danShumway asked, is there a way to work around systems missing the crypto libraries? cc @sponte

  14. maxkorp commented on Apr 18, 2017

    @maxkorp
    Collaborator

    The issue lies in the fact that it will only use the included openssl if that copy is already built, but that copy is built by the install. Something of a chicken and egg problem that needs to be resolved first. Haven't quite figured out a way around it yet though. Fixing that will allow it to use the locally included copy and should take care of that issue.

  15. 7 remaining items

  16. wiredearp commented on Dec 20, 2017

    @wiredearp

    On Ubuntu 16.04, I was able to sudo apt-get install libssl-dev to progress somewhat further before I got hit by another error called curl/curl.h: No such file or directory, but then I sudo apt-get install libcurl4-openssl-dev and the thing managed to finally install.

  17. michaelkruglos commented on Apr 15, 2018

    @michaelkruglos

    sudo apt install libcurl4-openssl-dev fixed the issue for me on Ubuntu 16.04
    I got the hint from the errors saying:

    make: Entering directory '/<REDACTED>/tweek/services/authoring/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/apply.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/attrcache.o
    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.o
    CC(target) Release/obj.target/libgit2/vendor/libgit2/src/curl_stream.o
    ../vendor/libgit2/src/curl_stream.c:10:23: fatal error: curl/curl.h: No such file or directory
    
    
  18. dvakatsiienko commented on Sep 26, 2018

    @dvakatsiienko

    Latest Xcode just straight up broke things all across the world. Try running sudo xcode-select --install and update the xcode CLT. That fixed it for me.

    This fix worked for me on macOS Sierra, but after upgrading to macOS Mojave this fix does not work anymore.

    brew install libgcrypt did fixed this issue though. I will test this a bit alter on clean macOS Mojave clean install. But as for now it looks like that nodegit is not working on Mojave by default, except libgcrypt is installed with brew.

  19. maxkorp commented on Sep 28, 2018

    @maxkorp
    Collaborator

    Guh, then it's configuring libssh "wrongly" however. But it works.

  20. LinxinS97 commented on Oct 1, 2018

    @LinxinS97

    sudo xcode-select --install is not work for macos 10.14 mojave, it still throws configure: error: No crypto library found!

  21. maxkorp commented on Oct 3, 2018

    @maxkorp
    Collaborator

    Yeah one of the major os versions made that insufficient (El Capitan maybe? Yosemite? I don't recall).

    Can you try installing [email protected]?

  22. implausible commented on Oct 4, 2018

    @implausible
    Member

    Would you please ping me if what @maxkorp suggested has fixed your errors? That would be super awesome! Trying to stay on top of what got fixed and what didn't in our big build change!

  23. RaevLogic commented on Oct 8, 2018

    @RaevLogic
    Contributor

    @maxkorp and @implausible check the nodegit slack. Someone with a similar configure: error: No crypto library found! problem just installed [email protected] and it fixed the issue for them.

  24. maxkorp commented on Oct 8, 2018

    @maxkorp
    Collaborator

    THIS IS GOING TO CLOSE SO MANY ISSUES

  25. RaevLogic commented on Oct 8, 2018

    @RaevLogic
    Contributor

    All hail Steve.

  26. dvakatsiienko commented on Oct 8, 2018

    @dvakatsiienko

    this is very very wanted for us!

  27. sidtagirisa commented on Jul 10, 2019

    @sidtagirisa

    export LDFLAGS="-L/usr/local/opt/openssl/lib"
    export CPPFLAGS="-I/usr/local/opt/openssl/include"

    Adding these to rc file for allowing compilers to find openssl, solved the issue for me.

  28. Leekao commented on Jul 30, 2019

    @Leekao

    I solved this issue by running "sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /" on my macOS.

  29. elviejo79 commented on Dec 31, 2019

    @elviejo79

    On Ubuntu 18.04
    I got the error:

    WARN Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.26.3-node-v79-linux-x64.tar.gz 
    node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, glibc) (falling back to source compile with node-gyp)
    /bin/sh: 1: krb5-config: not found
    gyp: Call to 'krb5-config gssapi --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
    gyp
    ERR! configure error

    my solution was:

     sudo apt install libkrb5-dev
  30. added a commit that references this issue on Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions