evancohen / sonus

:speech_balloon: /so.nus/ STT (speech to text) for Node with offline hotword detection
MIT License
618 stars 79 forks source link

Install fail #72

Closed ag-ni closed 5 years ago

ag-ni commented 6 years ago

The npm install --save sonus fails with errors. The first error seems to be - its not able to download the Snowboy package. We can install Snowboy manually or change the URL in the script.. But I don't know from where I can change the script. Can anyone help please.

node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.2.0/Release/snowboy-v1.2.0-node-v59-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.2.0 and node@9.3.0 (node-v59 ABI, glibc) (falling back to source compile with node-gyp) make: Entering directory '/home/pi/node_modules/snowboy/build' CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o SOLINK_MODULE(target) Release/obj.target/snowboy.node /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status snowboy.target.mk:131: recipe for target 'Release/obj.target/snowboy.node' failed make: *** [Release/obj.target/snowboy.node] Error 1 make: Leaving directory '/home/pi/node_modules/snowboy/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:258:23) gyp ERR! stack at ChildProcess.emit (events.js:159:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) gyp ERR! System Linux 4.9.59-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm" gyp ERR! cwd /home/pi/node_modules/snowboy gyp ERR! node -v v9.3.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/pi/node_modules/snowboy/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:159:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:943:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) node-pre-gyp ERR! System Linux 4.9.59-v7+ node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/node_modules/snowboy/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/node_modules/snowboy node-pre-gyp ERR! node -v v9.3.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/node_modules/snowboy/lib/node/binding/Release/node-v59-linux-arm' (1) npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! snowboy@1.2.0 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the snowboy@1.2.0 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! /home/pi/.npm/_logs/2017-12-22T06_59_42_257Z-debug.log

evancohen commented 6 years ago

Guessing this is because you are using Node 9.x - while this isn't technically supported yet, you should be able to build the native binary for yourself by running the following before npm install:

sudo apt-get install libmagic-dev libatlas-base-dev
npm install -g nan
ag-ni commented 6 years ago

Thanks a lot Evan. Appreciate your quick response. Let me try that.

-Regards Shek

Get your own email signature https://wisestamp.com/email-install?utm_source=promotion&utm_medium=signature&utm_campaign=get_your_own

On Sat, Dec 23, 2017 at 11:06 AM, Evan Cohen notifications@github.com wrote:

Guessing this is because you are using Node 9.x - while this isn't technically supported yet, you should be able to build the native binary for yourself by running the following before npm install:

sudo apt-get install libmagic-dev libatlas-base-dev npm install -g nan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evancohen/sonus/issues/72#issuecomment-353700714, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZKxMEHelyzqTra2H20MCw2_ollnFiWks5tDGA1gaJpZM4RKvXT .

-- Agnimitra Shekhar

shekharkhatri commented 5 years ago

I am facing the same issue. But I am on windows 10. Any suggestions? I have installed sox as well.

> snowboy@1.3.1 install D:\Projects\VoiceAi\node_modules\snowboy
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.3.1/Release/snowboy-v1.3.1-node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.3.1 and node@8.9.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Shekhar Khatri\AppData\Local\Programs\Python\Python36-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:554:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Shekhar Khatri\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\\Projects\\VoiceAi\\node_modules\\snowboy\\lib\\node\\binding\\Release\\node-v57-win32-x64\\snowboy.node" "--module_name=snowboy" "--module_path=D:\\Projects\\VoiceAi\\node_modules\\snowboy\\lib\\node\\binding\\Release\\node-v57-win32-x64"
gyp ERR! cwd D:\Projects\VoiceAi\node_modules\snowboy
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Shekhar Khatri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Projects\VoiceAi\node_modules\snowboy\lib\node\binding\Release\node-v57-win32-x64\snowboy.node --module_name=snowboy --module_path=D:\Projects\VoiceAi\node_modules\snowboy\lib\node\binding\Release\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\Projects\VoiceAi\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Projects\\VoiceAi\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\Projects\VoiceAi\node_modules\snowboy
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Shekhar Khatri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Projects\VoiceAi\node_modules\snowboy\lib\node\binding\Release\node-v57-win32-x64\snowboy.node --module_name=snowboy --module_path=D:\Projects\VoiceAi\node_modules\snowboy\lib\node\binding\Release\node-v57-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! snowboy@1.3.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snowboy@1.3.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!     C:\Users\Shekhar Khatri\AppData\Roaming\npm-cache\_logs\2019-03-09T07_20_16_057Z-debug.log
evancohen commented 5 years ago

@shekharkhatri Snowboy doesn't support Windows (and so unfortunately neither does this project).

evancohen commented 5 years ago

Guessing that this issue has been resolved since @ag-ni never got back to me, if not please feel free to re-open.