cmusphinx / node-pocketsphinx

Pocketsphinx bindings for Node.JS
Other
242 stars 47 forks source link

Error while installing Pocketsphinx in nodejs #38

Closed kate008 closed 7 years ago

kate008 commented 7 years ago

I try to use the Pocketsphinx in my nodejs project while installing this I am getting this error

pm ERR! Linux 3.16.0-77-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! pocketsphinx@5.0.7 install: cmake-js compile npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pocketsphinx@5.0.7 install script 'cmake-js compile'. npm ERR! This is most likely a problem with the pocketsphinx package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cmake-js compile npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pocketsphinx npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls pocketsphinx npm ERR! There is likely additional logging output above.

Please,help me to solve this error.

Thanks in advance.

nshmyrev commented 7 years ago

Please provide complete output, not just the last lines.

kate008 commented 7 years ago

This is the log,I try to install the "npm install pocketsphinx" and it throwing like this:

npm WARN package.json cmake-js@3.3.1 No bin file found at ./bin/cmake-js |

pocketsphinx@5.0.7 install /home/apptivo/cappius/Munwar/test_lda_topic_mining/node_modules/pocketsphinx cmake-js compile

info TOOL Using Unix Makefiles generator. info TOOL Using c++11 compiler standard. info REP Build has been failed, trying to do a full rebuild. ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org. npm ERR! Linux 3.16.0-77-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! pocketsphinx@5.0.7 install: cmake-js compile npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pocketsphinx@5.0.7 install script 'cmake-js compile'. npm ERR! This is most likely a problem with the pocketsphinx package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cmake-js compile npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pocketsphinx npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls pocketsphinx npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/apptivo/cappius/Munwar/test_lda_topic_mining/npm-debug.log

I mentioned the "Script" in the package.json file also.

nshmyrev commented 7 years ago

It says you need to install cmake.

kate008 commented 7 years ago

yes I installed that also as "npm install cmake.js",still throwing the error.

As I am new to this ,I am not sure whether I am following the correct procedure.

Please help on this.

nshmyrev commented 7 years ago

No, cmake and cmake-js are separate packages. You need to install cmake first. If you are on Ubuntu run sudo apt-get install cmake.

Visit http://cmake.org/ or use your distribution package manager like apt-get or yum.

kate008 commented 7 years ago

Now it is showing like this

CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.1 or higher is required. You are running version 2.8.12.2

This is the full log

cmake-js compile

info TOOL Using Unix Makefiles generator. info TOOL Using c++11 compiler standard. info CMD CONFIGURE info RUN cmake "/test-app/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.3.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/test-app/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/.cmake-js/node-x64/v4.5.0/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="4.5.0" -DNODE_ARCH="x64" -DCMAKE_CXX_FLAGS="-std=c++11" -DBUBU="kittyfck" Not searching for unused variables given on the command line. -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") CMake Error at /usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find SWIG: Found unsuitable version "2.0.11", but required is at least "3.0.7" (found /usr/bin/swig2.0) Call Stack (most recent call first): /usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.2/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred! See also "/test-app/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log". info REP Build has been failed, trying to do a full rebuild. info CMD CLEAN info RUN cmake -E remove_directory "/test-app/node_modules/pocketsphinx/build" info CMD CONFIGURE info RUN cmake "/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.3.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/test-app/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/.cmake-js/node-x64/v4.5.0/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="4.5.0" -DNODE_ARCH="x64" -DCMAKE_CXX_FLAGS="-std=c++11" -DBUBU="kittyfck" Not searching for unused variables given on the command line. -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") CMake Error at /usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find SWIG: Found unsuitable version "2.0.11", but required is at least "3.0.7" (found /usr/bin/swig2.0) Call Stack (most recent call first): /usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.2/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!

ERR! OMG Process terminated: 1 npm ERR! Linux 3.16.0-77-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! pocketsphinx@5.0.7 install: cmake-js compile npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pocketsphinx@5.0.7 install script 'cmake-js compile'. npm ERR! This is most likely a problem with the pocketsphinx package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cmake-js compile npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pocketsphinx npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls pocketsphinx npm ERR! There is likely additional logging output above.

nshmyrev commented 7 years ago

The messages are self-explaining