Skip to content

Cannot be installed under Docker Alpine #1361

@snics

Description

@snics

I would like to use NodeGit under Docker with the Node alpine image but its doesn't work. Do you know one of the ways to solve the problem?

I install NodeGit with yarn i get the following error message:

Error: Error loading shared library /home/node/node_modules/nodegit/build/Release/nodegit.node: Exec format error
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/node/node_modules/nodegit/dist/nodegit.js:11:12)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/node/src/utils/versioning.js:11:17)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)

I install NodeGit with npm i get the following error message:

> nodegit@0.20.1 install /home/node/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: Command failed: /home/node/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/node/node_modules/nodegit/vendor/openssl/openssl
/home/node/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/node/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
/home/node/node_modules/nodegit/vendor/libssh2/configure: ./configure.lineno: line 1: /usr/bin/file: not found
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

    at ChildProcess.exithandler (child_process.js:252:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:887:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: '/home/node/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/node/node_modules/nodegit/vendor/openssl/openssl' }
/home/node/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/node/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
/home/node/node_modules/nodegit/vendor/libssh2/configure: ./configure.lineno: line 1: /usr/bin/file: not found
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: /home/node/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/node/node_modules/nodegit/vendor/openssl/openssl
/home/node/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/node/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
/home/node/node_modules/nodegit/vendor/libssh2/configure: ./configure.lineno: line 1: /usr/bin/file: not found
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

    at ChildProcess.exithandler (child_process.js:252:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:887:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: '/home/node/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/node/node_modules/nodegit/vendor/openssl/openssl' }
npm info lifecycle nodegit@0.20.1~install: Failed to exec install script
npm WARN vao-api@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodegit@0.20.1 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.20.1 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!     /root/.npm/_logs/2017-08-30T10_48_59_977Z-debug.log

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