mscdex / node-mariasql

A node.js binding to MariaDB's non-blocking (MySQL-compatible) client library
MIT License
485 stars 73 forks source link

Install fails on Synology NAS #111

Open clemouk opened 9 years ago

clemouk commented 9 years ago

I've tried to install this package on my NAS drive, but it seems to fail towards the end, has anyone got any pointers or ideas what might be causing this (I've used Linux on and off for a while but by no means an expert - so apologies in advance if the solution is obvious)

This is an extract of the install log file -

1130 info install mariasql@0.2.1 1131 verbose unsafe-perm in lifecycle true 1132 info mariasql@0.2.1 Failed to exec install script 1133 verbose unlock done using /var/services/homes/admin/.npm/_locks/mariasql-79cbe2ef4db9a027.lock for /volume1/homes/admin/node_modules/mariasql 1134 verbose stack Error: mariasql@0.2.1 install: node-gyp rebuild 1134 verbose stack Exit status 1 1134 verbose stack at EventEmitter. (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16) 1134 verbose stack at EventEmitter.emit (events.js:110:17) 1134 verbose stack at ChildProcess. (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14) 1134 verbose stack at ChildProcess.emit (events.js:110:17) 1134 verbose stack at maybeClose (child_process.js:1015:16) 1134 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5) 1135 verbose pkgid mariasql@0.2.1 1136 verbose cwd /volume1/homes/admin 1137 error Linux 3.2.40 1138 error argv "/usr/bin/node" "/usr/bin/npm" "install" "mariasql" 1139 error node v0.12.4 1140 error npm v2.10.1 1141 error code ELIFECYCLE 1142 error mariasql@0.2.1 install: node-gyp rebuild 1142 error Exit status 1 1143 error Failed at the mariasql@0.2.1 install script 'node-gyp rebuild'. 1143 error This is most likely a problem with the mariasql package, 1143 error not with npm itself. 1143 error Tell the author that this fails on your system: 1143 error node-gyp rebuild 1143 error You can get their info via: 1143 error npm owner ls mariasql 1143 error There is likely additional logging output above. 1144 verbose exit [ 1, true ] 1145 verbose unbuild node_modules/mariasql 1146 info preuninstall mariasql@0.2.1 1147 info uninstall mariasql@0.2.1 1148 verbose unbuild rmStuff mariasql@0.2.1 from /volume1/homes/admin/node_modules 1149 info postuninstall mariasql@0.2.1 1150 silly gentlyRm /volume1/homes/admin/node_modules/mariasql is being purged from base /volume1/homes/admin 1151 verbose gentlyRm don't care about contents; nuking /volume1/homes/admin/node_modules/mariasql 1152 silly vacuum-fs purging /volume1/homes/admin/node_modules/mariasql 1153 silly vacuum-fs removing /volume1/homes/admin/node_modules 1154 silly vacuum-fs finished vacuuming up to /volume1/homes/admin

Thanks in advance, Lee

mscdex commented 9 years ago

Well, that log doesn't really say anything. Do you have the required build tools installed (e.g. gcc, g++, make, python 2.7+)?

Eusebiotrigo commented 8 years ago

In my Syno box it says: gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at F (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:43:28) gyp ERR! stack at E (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:46:29) gyp ERR! stack at /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:57:16 gyp ERR! stack at Object.oncomplete (evalmachine.:108:15) gyp ERR! System Linux 2.6.32.12 gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /volume1/XXXX/node_modules/mariasql gyp ERR! node -v v0.10.36 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok

The problem is with that we do not have make or build-essentials, nothing to do with mariasql.

Installing ipkg and then make:

make: Entering directory /volume1/XXXX/node_modules/mariasql/build' Makefile:1: /env.mak: No such file or directory make: *** No rule to make target/env.mak'. Stop. make: Leaving directory /volume1/XXXX/node_modules/mariasql/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) gyp ERR! System Linux 2.6.32.12 gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /volume1/XXXX/node_modules/mariasql gyp ERR! node -v v0.10.36 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok

mscdex commented 8 years ago

@Eusebiotrigo The /env.mak: No such file or directory error seems like a common problem with Synology judging by google results. So my guess is it has something to do with the build environment that they provide. Perhaps make is too old or something? I know node itself require (gnu) Make 3.81+ for example.

mscdex commented 8 years ago

You might also check the version of Python that's installed. 2.7.x is what I typically use.