Я хочу установить пакет tfjs-node в rpi как глобальный пакет с npm, я получил это ./Release/libtensorflow.so: file not recognized: File format not recognized by node-gyp rebuild command
. Как я мог это исправить?
Вот некоторые данные, которые вам могут понадобиться:
Версия TensorFlow.js
@ Tensorflow / tfjs-узел @ 0.2.1
Версия для Linux
root@raspberrypi:/home/pi/Desktop# uname -a
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
root@raspberrypi:/home/pi/Desktop# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.6 (stretch)
Release: 9.6
Codename: stretch
Версия узла
root@raspberrypi:/home/pi/Desktop# node -v
v11.6.0
root@raspberrypi:/home/pi/Desktop# npm -v
6.5.0-next.0
root@raspberrypi:/home/pi/Desktop# node-gyp -v
v3.8.0
Вот полный журнал:
root@raspberrypi:/home/pi/Desktop# npm install -g @tensorflow/tfjs-node
> @tensorflow/tfjs-node@0.2.1 install /usr/local/lib/node_modules/@tensorflow/tfjs-node
> node scripts/install.js
* Downloading libtensorflow
[==============================] 73626/bps 100% 0.0s
* Building TensorFlow Node.js bindings
/usr/local/lib/node_modules/@tensorflow/tfjs-node/scripts/install.js:176
throw new Error('node-gyp rebuild failed with: ' + err);
^
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
./Release/libtensorflow.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/tfjs_binding.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
at cp.exec (/usr/local/lib/node_modules/@tensorflow/tfjs-node/scripts/install.js:176:13)
at ChildProcess.exithandler (child_process.js:301:5)
at ChildProcess.emit (events.js:188:13)
at maybeClose (internal/child_process.js:978:16)
at Socket.stream.socket.on (internal/child_process.js:395:11)
at Socket.emit (events.js:188:13)
at Pipe._handle.close (net.js:610:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@0.2.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@0.2.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/2019-01-03T18_09_40_460Z-debug.log
Как я мог это исправить?