zeromq.node icon indicating copy to clipboard operation
zeromq.node copied to clipboard

Installing "zmq bindings for node" on completely offline system requires downloading node binaries and fail

Open amersaw opened this issue 9 years ago • 0 comments

After I successfully installed zmq, I used some way to install zmq bindings for node without the need for internet connection by first downloading its "dist.tarball" that can be get using:

npm view zmq dist.tarball 

and then simply:

npm install zeromq-4.0.5.tar.gz

zmq package also requires both bindings and nan packages, so I installed them before proceeding in zmq installation.

When I start the npm install zeromq-4.0.5.tar.gz command, I get an error while trying to download node binaries when rebuilding node node-gyp rebuild as it fails to get it from node's servers. Here is the full verbose log for the installation :

#npm install --verbose zmq-2.11.0.tgz
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   'install',
npm verb cli   '--verbose',
npm verb cli   'zmq-2.11.0.tgz' ]
npm info using [email protected]
npm info using [email protected]
npm verb cache add [ 'zmq-2.11.0.tgz', null ]
npm verb cache add name=undefined spec="zmq-2.11.0.tgz" args=["zmq-2.11.0.tgz",null]
npm verb parsed url { protocol: null,
npm verb parsed url   slashes: null,
npm verb parsed url   auth: null,
npm verb parsed url   host: null,
npm verb parsed url   port: null,
npm verb parsed url   hostname: null,
npm verb parsed url   hash: null,
npm verb parsed url   search: null,
npm verb parsed url   query: null,
npm verb parsed url   pathname: 'zmq-2.11.0.tgz',
npm verb parsed url   path: 'zmq-2.11.0.tgz',
npm verb parsed url   href: 'zmq-2.11.0.tgz' }
npm verb lock zmq-2.11.0.tgz /home/root/.npm/78ab13d3-zmq-2-11-0-tgz.lock
npm verb chmod /home/root/tmp/npm-580-NqgAlQ7v/1429735412116-0.6333971649874002/tmp.tgz 644
npm verb tar unpack /home/root/tmp/npm-580-NqgAlQ7v/1429735412116-0.6333971649874002/tmp.tgz
npm verb lock tar:///home/root/.npm/tmp_d713d5c5d3d8tmp_3287d3c78245package /home/root/.npm/34df6f7b-3d5c5d3d8tmp-3287d3c78245package.lock
npm verb lock tar:///home/root/tmp/npm-580-NqgAlQ7v/1429735412116-0.6333971649874002/tmp.tgz /home/root/.npm/fb507fa2-12116-0-6333971649874002-tmp-tgz.lock
npm info install [email protected] into /home/root/pkgs/zmq/nodeAPI
npm info installOne [email protected]
npm info /home/root/pkgs/zmq/nodeAPI/node_modules/zmq unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm verb true,/home/root/pkgs/zmq/nodeAPI/node_modules,/home/root/pkgs/zmq/nodeAPI/node_modules unbuild [email protected]
npm info postuninstall [email protected]
npm verb tar unpack /home/root/.npm/zmq/2.11.0/package.tgz
npm verb lock tar:///home/root/pkgs/zmq/nodeAPI/node_modules/zmq /home/root/.npm/5510e8c3-kgs-zmq-nodeAPI-node-modules-zmq.lock
npm verb lock tar:///home/root/.npm/zmq/2.11.0/package.tgz /home/root/.npm/e387c903--root-npm-zmq-2-11-0-package-tgz.lock
npm info preinstall [email protected]
npm verb readDependencies using package.json deps
npm verb readDependencies using package.json deps
npm verb about to build /home/root/pkgs/zmq/nodeAPI/node_modules/zmq
npm info build /home/root/pkgs/zmq/nodeAPI/node_modules/zmq
npm verb linkStuff [ false,
npm verb linkStuff   false,
npm verb linkStuff   false,
npm verb linkStuff   '/home/root/pkgs/zmq/nodeAPI/node_modules' ]
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm verb rebuildBundles [email protected]
npm info install [email protected]

> [email protected] install /home/root/pkgs/zmq/nodeAPI/node_modules/zmq
> 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 | ia32
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 "/usr/bin/python2.7" in the PATH
gyp verb `which` succeeded /usr/bin/python2.7 /usr/bin/python2.7
gyp verb check python version `/usr/bin/python2.7 -c "import platform; print(platform.python_version());"` returned: "2.7.3\n"
gyp verb get node dir no --target version specified, falling back to host node version: v0.10.28
gyp verb command install [ 'v0.10.28' ]
gyp verb install input version string "v0.10.28"
gyp verb install installing version: 0.10.28
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 0.10.28
gyp verb ensuring nodedir is created /home/root/.node-gyp/0.10.28
gyp verb created nodedir /home/root/.node-gyp/0.10.28

gyp http GET http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz

gyp WARN install got an error, rolling back install
gyp verb command remove [ '0.10.28' ]
gyp verb remove using node-gyp dir: /home/root/.node-gyp
gyp verb remove removing target version: 0.10.28
gyp verb remove removing development files for version: 0.10.28
gyp ERR! configure error
gyp ERR! stack Error: getaddrinfo ENOTFOUND
gyp ERR! stack     at errnoException (dns.js:37:11)
gyp ERR! stack     at Object.onanswer [as oncomplete] (dns.js:124:16)
gyp ERR! System Linux 3.10.17-poky-edison+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/root/pkgs/zmq/nodeAPI/node_modules/zmq
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm verb unsafe-perm in lifecycle false
npm info [email protected] Failed to exec install script
npm info /home/root/pkgs/zmq/nodeAPI/node_modules/zmq unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm verb true,/home/root/pkgs/zmq/nodeAPI/node_modules,/home/root/pkgs/zmq/nodeAPI/node_modules unbuild [email protected]
npm info postuninstall [email protected]
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.10.17-poky-edison+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "--verbose" "zmq-2.11.0.tgz"
npm ERR! cwd /home/root/pkgs/zmq/nodeAPI
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/root/pkgs/zmq/nodeAPI/npm-debug.log
npm ERR! not ok code 0

I tried to download the node-v0.10.28.tar.gz file manually and put it in the nodedir /home/root/.node-gyp/0.10.28 but also the same.

Does that mean that I have to have internet connection when ever I need to install zmq bindings for node ??

I'm working on Intel Edison that have : Linux : 3.10.17-poky-edison+ Node : v0.10.28 Python : 2.7.3

amersaw avatar Apr 23 '15 11:04 amersaw