Skip to content

Instantly share code, notes, and snippets.

@shaunthomas999
Created June 29, 2015 15:26
Show Gist options
  • Save shaunthomas999/e5bf339aa38aafe9f7e3 to your computer and use it in GitHub Desktop.
Save shaunthomas999/e5bf339aa38aafe9f7e3 to your computer and use it in GitHub Desktop.
Error during npm install with node-gyp rebuild when trying to build from Dockerfile
npm info install [email protected]
npm info postinstall [email protected]
npm info install [email protected]
npm info [email protected] Failed to exec install script
> [email protected] install /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `python2 -c "import platform; print(platform.python_version());"` returned: "2.7.6\n"
gyp verb get node dir compiling against specified --nodedir dev files: /usr/lib/nodejs
gyp verb build dir attempting to create "build" dir: /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_
modules/ref/build
gyp verb build dir "build" dir needed to be created? /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_
modules/ref/build
gyp verb build/config.gypi creating config file
gyp sill build/config.gypi { target_defaults:
gyp sill build/config.gypi { cflags: [],
gyp sill build/config.gypi default_configuration: 'Release',
gyp sill build/config.gypi defines: [],
gyp sill build/config.gypi include_dirs: [],
gyp sill build/config.gypi libraries: [] },
gyp sill build/config.gypi variables:
gyp sill build/config.gypi { clang: 0,
gyp sill build/config.gypi gcc_version: 48,
gyp sill build/config.gypi host_arch: 'x64',
gyp sill build/config.gypi node_install_npm: true,
gyp sill build/config.gypi node_prefix: '/usr',
gyp sill build/config.gypi node_shared_cares: false,
gyp sill build/config.gypi node_shared_http_parser: false,
gyp sill build/config.gypi node_shared_libuv: false,
gyp sill build/config.gypi node_shared_openssl: false,
gyp sill build/config.gypi node_shared_v8: false,
gyp sill build/config.gypi node_shared_zlib: false,
gyp sill build/config.gypi node_tag: '',
gyp sill build/config.gypi node_unsafe_optimizations: 0,
gyp sill build/config.gypi node_use_dtrace: false,
gyp sill build/config.gypi node_use_etw: false,
gyp sill build/config.gypi node_use_openssl: true,
gyp sill build/config.gypi node_use_perfctr: false,
gyp sill build/config.gypi node_use_systemtap: false,
gyp sill build/config.gypi openssl_no_asm: 0,
gyp sill build/config.gypi python: '/usr/bin/python',
gyp sill build/config.gypi target_arch: 'x64',
gyp sill build/config.gypi v8_enable_gdbjit: 0,
gyp sill build/config.gypi v8_no_strict_aliasing: 1,
gyp sill build/config.gypi v8_use_snapshot: false,
gyp sill build/config.gypi want_separate_host_toolset: 0,
gyp sill build/config.gypi nodedir: '/usr/lib/nodejs',
gyp sill build/config.gypi copy_dev_lib: false,
gyp sill build/config.gypi standalone_static_library: 1,
gyp sill build/config.gypi cache_lock_stale: '60000',
gyp sill build/config.gypi sign_git_tag: '',
gyp sill build/config.gypi user_agent: 'npm/2.12.0 node/v0.10.39 linux x64',
gyp sill build/config.gypi always_auth: '',
gyp sill build/config.gypi bin_links: 'true',
gyp sill build/config.gypi key: '',
gyp sill build/config.gypi description: 'true',
gyp sill build/config.gypi fetch_retries: '2',
gyp sill build/config.gypi heading: 'npm',
gyp sill build/config.gypi if_present: '',
gyp sill build/config.gypi init_version: '1.0.0',
gyp sill build/config.gypi user: '',
gyp sill build/config.gypi force: '',
gyp sill build/config.gypi cache_min: '10',
gyp sill build/config.gypi init_license: 'ISC',
gyp sill build/config.gypi editor: 'vi',
gyp sill build/config.gypi rollback: 'true',
gyp sill build/config.gypi tag_version_prefix: 'v',
gyp sill build/config.gypi cache_max: 'Infinity',
gyp sill build/config.gypi userconfig: '/usr/local/nonroot/.npmrc',
gyp sill build/config.gypi engine_strict: '',
gyp sill build/config.gypi init_author_name: '',
gyp sill build/config.gypi init_author_url: '',
gyp sill build/config.gypi tmp: '/tmp',
gyp sill build/config.gypi depth: 'Infinity',
gyp sill build/config.gypi save_dev: '',
gyp sill build/config.gypi usage: '',
gyp sill build/config.gypi cafile: '',
gyp sill build/config.gypi https_proxy: '',
gyp sill build/config.gypi onload_script: '',
gyp sill build/config.gypi rebuild_bundle: 'true',
gyp sill build/config.gypi save_bundle: '',
gyp sill build/config.gypi shell: 'bash',
gyp sill build/config.gypi prefix: '/usr',
gyp sill build/config.gypi browser: '',
gyp sill build/config.gypi cache_lock_wait: '10000',
gyp sill build/config.gypi registry: 'https://registry.npmjs.org/',
gyp sill build/config.gypi save_optional: '',
gyp sill build/config.gypi scope: '',
gyp sill build/config.gypi searchopts: '',
gyp sill build/config.gypi versions: '',
gyp sill build/config.gypi cache: '/usr/local/nonroot/.npm',
gyp sill build/config.gypi ignore_scripts: '',
gyp sill build/config.gypi searchsort: 'name',
gyp sill build/config.gypi version: '',
gyp sill build/config.gypi local_address: '',
gyp sill build/config.gypi viewer: 'man',
gyp sill build/config.gypi color: 'true',
gyp sill build/config.gypi fetch_retry_mintimeout: '10000',
gyp sill build/config.gypi umask: '0022',
gyp sill build/config.gypi fetch_retry_maxtimeout: '60000',
gyp sill build/config.gypi message: '%s',
gyp sill build/config.gypi ca: '',
gyp sill build/config.gypi cert: '',
gyp sill build/config.gypi global: '',
gyp sill build/config.gypi link: '',
gyp sill build/config.gypi access: '',
gyp sill build/config.gypi save: '',
gyp sill build/config.gypi unicode: 'true',
gyp sill build/config.gypi long: '',
gyp sill build/config.gypi production: '',
gyp sill build/config.gypi unsafe_perm: '',
gyp sill build/config.gypi node_version: '0.10.39',
gyp sill build/config.gypi tag: 'latest',
gyp sill build/config.gypi git_tag_version: 'true',
gyp sill build/config.gypi shrinkwrap: 'true',
gyp sill build/config.gypi fetch_retry_factor: '10',
gyp sill build/config.gypi npat: '',
gyp sill build/config.gypi proprietary_attribs: 'true',
gyp sill build/config.gypi save_exact: '',
gyp sill build/config.gypi strict_ssl: 'true',
gyp sill build/config.gypi dev: '',
gyp sill build/config.gypi globalconfig: '/usr/etc/npmrc',
gyp sill build/config.gypi init_module: '/usr/local/nonroot/.npm-init.js',
gyp sill build/config.gypi parseable: '',
gyp sill build/config.gypi globalignorefile: '/usr/etc/npmignore',
gyp sill build/config.gypi cache_lock_retries: '10',
gyp sill build/config.gypi save_prefix: '^',
gyp sill build/config.gypi group: '',
gyp sill build/config.gypi init_author_email: '',
gyp sill build/config.gypi searchexclude: '',
gyp sill build/config.gypi git: 'git',
gyp sill build/config.gypi optional: 'true',
gyp sill build/config.gypi json: '',
gyp sill build/config.gypi spin: 'true' } }
gyp verb build/config.gypi writing out config file: /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_m
odules/ref/build/config.gypi
gyp verb config.gypi checking for gypi file: /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/
ref/config.gypi
gyp verb common.gypi checking for gypi file: /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/
ref/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref/build/config.gypi'
,
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/nodejs/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/usr/lib/nodejs',
gyp info spawn args '-Dmodule_root_dir=/tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref'
,
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /usr/lib/nodejs
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref/build'
g++ '-DNODE_GYP_MODULE_NAME=binding' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr
/lib/nodejs/src -I/usr/lib/nodejs/deps/uv/include -I/usr/lib/nodejs/deps/v8/include -I../node_modules/nan -fPIC -Wall -
Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno
-exceptions -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c -o Release/obj.target/binding/sr
c/binding.o ../src/binding.cc
../src/binding.cc:6:18: fatal error: node.h: No such file or directory
#include "node.h"
^
compilation terminated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory `/tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 4.0.3-boot2docker
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi/node_modules/ref
gyp ERR! node -v v0.10.39
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm verb unsafe-perm in lifecycle false
npm verb unlock done using /usr/local/nonroot/.npm/_locks/libxmljs-8e8952378ccaab58.lock for /tmp/hub_node_modules/node_
modules/libxmljs
npm info [email protected] Failed to exec install script
> [email protected] install /tmp/hub_node_modules/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: not found
npm verb unsafe-perm in lifecycle false
npm verb unlock done using /usr/local/nonroot/.npm/_locks/ref-6c7e26db9134039c.lock for /tmp/hub_node_modules/node_modul
es/exec-sync/node_modules/ffi/node_modules/ref
npm verb about to build /tmp/hub_node_modules/node_modules/exec-sync/node_modules/ffi
npm verb unlock done using /usr/local/nonroot/.npm/_locks/ffi-c724c27101126aa4.lock for /tmp/hub_node_modules/node_modul
es/exec-sync/node_modules/ffi
npm verb about to build /tmp/hub_node_modules/node_modules/exec-sync
npm info [email protected] Failed to exec install script
npm verb unlock done using /usr/local/nonroot/.npm/_locks/exec-sync-0afa2e7e4ff7d937.lock for /tmp/hub_node_modules/node
_modules/exec-sync
npm verb unlock done using /usr/local/nonroot/.npm/_locks/sqlite3-8f1b2b4d6261ee24.lock for /tmp/hub_node_modules/node_m
odules/sqlite3
npm verb stack Error: [email protected] install: `node-gyp rebuild`
npm verb stack Exit status 1
npm verb stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
npm verb stack at EventEmitter.emit (events.js:98:17)
npm verb stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack at ChildProcess.emit (events.js:98:17)
npm verb stack at maybeClose (child_process.js:766:16)
npm verb stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
npm verb pkgid [email protected]
npm verb cwd /tmp/hub_node_modules
npm ERR! Linux 4.0.3-boot2docker
npm ERR! argv "node" "/usr/bin/npm" "install" "-ddd"
npm ERR! node v0.10.39
npm ERR! npm v2.12.0
npm ERR! code ELIFECYCLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment