Project-OSRM/node-osrm

Can't install node-osrm after install osrm-backend

alimohammad1995 opened this issue · 5 comments

Hi, I'm trying to install node-osrm, but I already have installed osrm-backend. I have result from all these commands which shows node-backend installed successfully

which osrm-extract
which osrm-contract
which osrm-datastore
pkg-config libosrm --variable=prefix

And the error is this

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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
-- No build type specified, defaulting to Release
CMake Error at CMakeLists.txt:90 (find_package):
By not providing "FindLibOSRM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "LibOSRM", but
CMake did not find one.
Could not find a package configuration file provided by "LibOSRM" with any
of the following names:
LibOSRMConfig.cmake
libosrm-config.cmake
Add the installation prefix of "LibOSRM" to CMAKE_PREFIX_PATH or set
"LibOSRM_DIR" to a directory containing one of the above files. If
"LibOSRM" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/alimohammad/temp/node-osrm/build/CMakeFiles/CMakeOutput.log".

So what's the problem?!

Can you try with 139b7eb in master?

Yeah, I've tried it a couple hours ago with this results

562 verbose stack Error: osrm@5.5.4 install: node-pre-gyp install --fallback-to-build=false || make562 verbose stack Exit status 2 562 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 562 verbose stack at emitTwo (events.js:106:13) 562 verbose stack at EventEmitter.emit (events.js:192:7) 562 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 562 verbose stack at emitTwo (events.js:106:13) 562 verbose stack at ChildProcess.emit (events.js:192:7) 562 verbose stack at maybeClose (internal/child_process.js:890:16) 562 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 563 verbose pkgid osrm@5.5.4 564 verbose cwd /root 565 error Linux 4.4.0-59-generic 566 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "osrm" 567 error node v7.5.0 568 error npm v4.1.2 569 error code ELIFECYCLE 570 error osrm@5.5.4 install:node-pre-gyp install --fallback-to-build=false || make570 error Exit status 2 571 error Failed at the osrm@5.5.4 install script 'node-pre-gyp install --fallback-to-build=false || make'. 571 error Make sure you have the latest version of node.js and npm installed. 571 error If you do, this is most likely a problem with the osrm package, 571 error not with npm itself. 571 error Tell the author that this fails on your system: 571 error node-pre-gyp install --fallback-to-build=false || make 571 error You can get information on how to open an issue for this project with: 571 error npm bugs osrm 571 error Or if that isn't available, you can get their info via: 571 error npm owner ls osrm 571 error There is likely additional logging output above. 572 verbose exit [ 1, true ]

Please do:

rm -rf build
mkdir build
cd build
cmake ..
make

This assumes you have OSRM installed globally.

npm install / make in the root will always build with a bundled OSRM.

But I have installed OSRM globally! Can I install it via npm locally in my nodejs application? (Still some errors occur while trying

npm install osrm

Please re-open in the backend if this still is an issue. For context: the Node.js bindings moved into the backend.