Project-OSRM/node-osrm

No binaries available for Node 6.x

drag0s opened this issue · 2 comments

Unable to install node-osrm with npm. Using the latest versions of npm and nodejs.

admin@replica1:~/osrm$ npm install osrm

> osrm@5.2.7 install /home/admin/osrm/node_modules/osrm
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.2.7/Release/node-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for osrm@5.2.7 and node@6.3.0 (node-v48 ABI) (falling back to source compile with node-gyp) 
/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config libosrm --cflags' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/admin/osrm/node_modules/osrm/lib/binding/osrm.node" "--module_name=osrm" "--module_path=/home/admin/osrm/node_modules/osrm/lib/binding"
gyp ERR! cwd /home/admin/osrm/node_modules/osrm
gyp ERR! node -v v6.3.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/admin/osrm/node_modules/osrm/lib/binding/osrm.node --module_name=osrm --module_path=/home/admin/osrm/node_modules/osrm/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/admin/osrm/node_modules/osrm/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:852:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Linux 3.16.0-4-amd64
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/admin/osrm/node_modules/osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/admin/osrm/node_modules/osrm
node-pre-gyp ERR! node -v v6.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.29
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/admin/osrm/node_modules/osrm/lib/binding/osrm.node --module_name=osrm --module_path=/home/admin/osrm/node_modules/osrm/lib/binding' (1)
npm WARN osrm-server@1.0.0 No description
npm WARN osrm-server@1.0.0 No repository field.
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "osrm"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! osrm@5.2.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the osrm@5.2.7 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the osrm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs osrm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osrm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/admin/osrm/npm-debug.log

I also attach you the npm-debug.log file.

Thanks in advance!

We're only publishing binaries for 4.x at the moment, and haven't started support for 6.x.

You can try installing pkg-config and seeing if the build works (that's the error on the second line of your log), but because there are no binaries available for 6.x, you're going to need the full build suite for the OSRM C++ project.

6.x isn't really on our radar at this stage.

Thank you @danpat