FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Cannot install on debian9 · Issue #1592 · nodegit/nodegit · GitHub

Repository navigation

Cannot install on debian9 #1592

Description

System information

  • node version: v10.14.0
  • npm or yarn version: 6.4.1
  • OS/version/architecture: linux - debian9 / 4.15.0-39-generic / x64
  • Applicable nodegit version: 0.23.0

When installing on debian9 after installing the required deps you get this error:

[nodegit] WARN - Could not finish postinstall
{ Error: Command failed: node "/node_modules/nodegit/dist/nodegit.js"
/node_modules/nodegit/dist/nodegit.js:16
throw ex;
^
Error: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/node_modules/nodegit/dist/nodegit.js:12:12)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at ChildProcess.exithandler (child_process.js:289:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
killed: false,
code: 1,
signal: null,
cmd: 'node "/node_modules/nodegit/dist/nodegit.js"' }

Here's the script required to reproduce this in a docker container.

docker run --rm -it gcr.io/google-appengine/debian9 bash
apt update && apt install -y curl gnupg
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt install -y nodejs
apt install -y libcurl4-gnutls-dev
npm install nodegit

or as a single command

docker run --rm gcr.io/google-appengine/debian9 bash -c "apt update && apt install -y curl gnupg && curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt install -y nodejs libcurl4-gnutls-dev && npm install nodegit"

It may be a little naive but ideally the dependencies on system libs should be removed. This makes it very difficult for us to use since our applications are used in a variety of OS's and distributions.

Activity

  1. StuartWhelan commented on Nov 28, 2018

    I have encountered this also

  2. publicvirtualvoid commented on Nov 28, 2018

    I faced a lot of similar problems trying to get it running in a Ubuntu 18.04 container.

  3. ef4 commented on Nov 30, 2018

    I see the problem here. node-pre-gyp is locating a prebuilt binary that it thinks is compatible, and so skipping the local build. But that binary dynamically links to libssl1.0.0, which is not available.

    If you set the BUILD_ONLY environment variable during npm install, it will force a local build and avoid the bug. At the cost of a much slower install, and now you need to make sure you have all the toolchain and dev libraries to support the compilation.

  4. implausible commented on Dec 13, 2018

    Member

    npm install --build-from-source nodegit should also work.

  5. Toxicable commented on Dec 13, 2018

    Author

    That doesn't solve this issue, it's simply a workaround.
    Also it requires even more system dependencies to be able to build it in the first place which is just as bad requiring our targets to install those.

  6. publicvirtualvoid commented on Dec 13, 2018

    npm install --build-from-source nodegit should also work.

    This doesn't work at all.
    Could you reopen this issue please.

  7. tommoor commented on Dec 20, 2018

    That doesn't solve this issue, it's simply a workaround.

    Agree, could we reopen this until there is a real fix in place?

  8. implausible commented on Dec 20, 2018

    Member

    @publicvirtualvoid What dependencies are you missing when you buiild from source?

  9. implausible commented on Dec 20, 2018

    Member

    @tommoor While it is nice to have the prebuilts, there are definitely restrictions with how portable they actually are. For example, it's possible we might be able to resolve this particular case with #1600 however, until libgit2/libgit2#4870 lands in a release, we are pretty much bound to have portability problems due to our libcurl dependency. Sometimes, the prebuilts just aren't going to work for a particular system, and building from source is a perfectly valid expectation. Hopefully, in the future we will provide prebuilts that work on these platforms, but as long as nodegit remains buildable on platforms that are not targeted by our prebuilts, I would say it's not really a workaround but more of an installation procedure that should be better documented.

  10. ef4 commented on Dec 20, 2018

    It's fine to have a prebuild that only works for some people. What's bad is that the installer code is unable to notice that fact.

    I realize that is mostly node-pre-gyp's fault for having an incomplete model of what it means to locate a compatible build. But the knowledge of which libraries are needed belongs inside nodegit regardless, and before spawning node-pre-gyp it could verify known preconditions that should cause it to force a local build.

  11. implausible commented on Dec 20, 2018

    Member

    That's a fair point @ef4. I think with that approach it may be solvable.

  12. tommoor commented on Dec 20, 2018

    Thanks for articulating that better than I could @ef4 😄

  13. ethomson commented on Feb 12, 2019

    Note: libgit2/libgit2#4870 did land in libgit2 v0.28.0, which was released yesterday. I hope that resolves this issue.

  14. implausible commented on Feb 12, 2019

    Member

    Awesome. I've been working on rolling that up into the next release of NodeGit.
    For Node, openssl / curl should no longer be an issue after release of 0.25.0.
    For Electron, openssl will remain an issue on Linux until electron/electron#16243 lands.

  15. Toxicable commented on Feb 16, 2019

    Author

    The latest alpha appears to work on debian9 as can be reproduced with this command

    docker run --rm gcr.io/google-appengine/debian9 bash -c "apt update && apt install -y curl gnupg && curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt install -y nodejs && npm install nodegit@0.25.0-alpha.6"
    
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


      Back | FazBrowse Home | New Git URL