recipe for target 'Release/libtensorflow.so' failed when installing `tfjs-node`
See original GitHub issueTensorFlow.js version
@tensorflow/tfjs-node
- 0.1.8
Browser version
N/A
Linux version
$ uname -a
Linux hostname 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
Describe the problem or feature request
Whenever I try to install @tensorflow/tfjs-node
, node-gyp
exits with code 1
.
Code to reproduce the bug / link to feature request
$ yarn add @tensorflow/tfjs @tensorflow/tfjs-node
yarn add v1.7.0
info No lockfile found.
[1/4] Resolving packages...
โ (node:32362) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @tensorflow/tfjs-node@0.1.8" has unmet peer dependency "@tensorflow/tfjs-core@~0.12.1".
[4/4] Building fresh packages...
[1/2] โ protobufjs
error ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.6.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '~/.nvm/versions/node/v10.6.0/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 '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.node-gyp/10.6.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=~/.node-gyp/10.6.0',
gyp info spawn args '-Dnode_gyp_dir=~/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=~/.node-gyp/10.6.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node',
gyp info spawn args '-Dnode_engine=v8',
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 info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build'
ACTION binding_gyp_tfjs_binding_target_download_libtensorflow Release/libtensorflow.so
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.0M 100 14.0M 0 0 178k 0 0:01:20 0:01:20 --:--:-- 173k
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
tfjs_binding.target.mk:13: recipe for target 'Release/libtensorflow.so' failed
make: Leaving directory '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build'
make: *** [Release/libtensorflow.so] Error 2
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (~/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.15.0-23-generic
gyp ERR! command "~/.nvm/versions/node/v10.6.0/bin/node" "~/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v10.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
I tried with the LTS (8.11.3) version of Node, and get the same error:
$ yarn add @tensorflow/tfjs @tensorflow/tfjs-node
yarn add v1.7.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @tensorflow/tfjs-node@0.1.8" has unmet peer dependency "@tensorflow/tfjs-core@~0.12.1".
[4/4] Building fresh packages...
[1/2] โก protobufjs
error ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.11.3 | linux | x64
gyp http GET https://nodejs.org/download/release/v8.11.3/node-v8.11.3-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v8.11.3/node-v8.11.3-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v8.11.3/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v8.11.3/SHASUMS256.txt
gyp info spawn /usr/bin/python2
gyp info spawn args [ '~/.nvm/versions/node/v8.11.3/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 '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.node-gyp/8.11.3/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=~/.node-gyp/8.11.3',
gyp info spawn args '-Dnode_gyp_dir=~/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=~/.node-gyp/8.11.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node',
gyp info spawn args '-Dnode_engine=v8',
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 info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build'
ACTION binding_gyp_tfjs_binding_target_download_libtensorflow Release/libtensorflow.so
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.0M 100 14.0M 0 0 224k 0 0:01:03 0:01:03 --:--:-- 360k
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
tfjs_binding.target.mk:13: recipe for target 'Release/libtensorflow.so' failed
make: Leaving directory '~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node/build'
make: *** [Release/libtensorflow.so] Error 2
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (~/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-23-generic
gyp ERR! command "~/.nvm/versions/node/v8.11.3/bin/node" "~/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/playground/tensorflowjs_tmp/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Unable to "npm install @tensorflow/tfjs-node" - Stack Overflow
Finally, i can run TensorFlow.js Node sample on Windows. Indeed, it runs on Ubuntu WSL (Windows Subsystem for Linux).
Read more >Npm NodeJS Installe node-gyp rebuild error "libtensorflow.so
From looking at the logs in the console it seems that Tensorflow.js Node when it's installing and runs node-gyp rebuild it get's an...
Read more >Setup | TensorFlow.js
Option 1: Install TensorFlow.js with native C++ bindings. tfjs-node ยท Option 2: (Linux Only) If your system has a NVIDIAยฎ GPU with CUDA...
Read more >@tensorflow/tfjs - npm
Use flexible and intuitive APIs to build models from scratch using the low-level JavaScript linear algebra library or the high-level layers API.
Read more >node-red-contrib-tf-model 0.1.10
This module requires @tensorflow/tfjs-node as a peer dependency. ... You will see an error message while downloading/installing/compiling the sharedย ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually - just published 0.1.9 since we had one small fix queued.
@nkreeger Thanks for your quick response. Just to confirm, I am now using
tfjs-node
v0.1.9
and itโs working like a charm!