node-mariasql icon indicating copy to clipboard operation
node-mariasql copied to clipboard

facing make error while installing via vagrant

Open mithundas79 opened this issue 7 years ago • 9 comments

Faced the following error while trying to install mariadb with the command

npm install mariasql --no-bin-skips

photo1285124609933420458

mithundas79 avatar Sep 15 '16 12:09 mithundas79

Since it appears you're on Ubuntu 12.04, you probably need to update your compiler. You will need gcc/g++ 4.8+ for any node addons.

mscdex avatar Sep 15 '16 15:09 mscdex

same here but with gcc 5.3.0 installed https://s24.postimg.org/uecefz5t1/2017_01_15_10_37_25.png

young310 avatar Jan 15 '17 02:01 young310

@young310 Please copy and paste the entire text output here.

mscdex avatar Jan 15 '17 02:01 mscdex

[young@DiskStation:/volume1/web/line_push_server$ npm install mariasql --save

[email protected] install /volume1/web/line_push_server/node_modules/mariasql node-gyp rebuild

make: Entering directory '/volume1/web/line_push_server/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/web/line_push_server/node_modules/mariasql/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 3.10.77 gyp ERR! command "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /volume1/web/line_push_server/node_modules/mariasql gyp ERR! node -v v4.4.2 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Linux 3.10.77 npm ERR! argv "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/bin/npm" "install" "mariasql" "--save" npm ERR! node v4.4.2 npm ERR! npm v2.15.0 npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request: npm ERR! /volume1/web/line_push_server/npm-debug.log

young310 avatar Jan 15 '17 02:01 young310

@young310 What do which make and make -v output? Also, are you doing this on a Synology NAS by any chance?

mscdex avatar Jan 15 '17 03:01 mscdex

@mscdex Yes, I am doing this on a Synology NAS 1515+ with DSM 6.0.2-8451 Update 8

young@DiskStation:/volume1/web/line_push_server$ which make /opt/bin/make young@DiskStation:/volume1/web/line_push_server$ make -v GNU Make 4.1 Built for i686-buildroot-linux-gnu Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

young310 avatar Jan 15 '17 03:01 young310

FWIW according to results from google, others have had the same issue (with other compiled node.js addons) on that NAS and they ended up just creating a debian chroot to be able to compile correctly.

mscdex avatar Jan 15 '17 03:01 mscdex

@mscdex Thanks for your suggestion. I have tried chroot but with no luck. Here comes new error,

^Croot@DiskStation:/volume1/web/line_push_server# npm install mariasql --save

[email protected] install /volume1/web/line_push_server/node_modules/mariasql node-gyp rebuild

gyp ERR! configure error gyp ERR! stack Error: Command failed: Traceback (most recent call last): gyp ERR! stack File "/usr/lib/python2.7/site.py", line 563, in gyp ERR! stack main() gyp ERR! stack File "/usr/lib/python2.7/site.py", line 545, in main gyp ERR! stack known_paths = addusersitepackages(known_paths) gyp ERR! stack File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages gyp ERR! stack user_site = getusersitepackages() gyp ERR! stack File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages gyp ERR! stack user_base = getuserbase() # this will also set USER_BASE gyp ERR! stack File "/usr/lib/python2.7/site.py", line 237, in getuserbase gyp ERR! stack USER_BASE = get_config_var('userbase') gyp ERR! stack File "/usr/lib/python2.7/sysconfig.py", line 582, in get_config _vars gyp ERR! stack _CONFIG_VARS['userbase'] = _getuserbase() gyp ERR! stack File "/usr/lib/python2.7/sysconfig.py", line 210, in _getuserbase gyp ERR! stack return env_base if env_base else joinuser("~", ".local") gyp ERR! stack File "/usr/lib/python2.7/sysconfig.py", line 196, in joinuser gyp ERR! stack return os.path.expanduser(os.path.join(*args)) gyp ERR! stack File "/usr/lib/python2.7/posixpath.py", line 269, in expanduser gyp ERR! stack userhome = pwd.getpwuid(os.getuid()).pw_dir gyp ERR! stack KeyError: 'getpwuid(): uid not found: 1028' gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:647:15) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at maybeClose (child_process.js:755:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:822:5) gyp ERR! System Linux 3.10.77 gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /volume1/web/line_push_server/node_modules/mariasql gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is most likely a problem with the mariasql package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls mariasql npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.10.77 npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "mariasql" "--save" npm ERR! cwd /volume1/web/line_push_server npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /volume1/web/line_push_server/npm-debug.log npm ERR! not ok code 0

young310 avatar Jan 15 '17 10:01 young310

@young310 This seems to be the actual error in that text:

getpwuid(): uid not found: 1028

It sounds like something is definitely not right though, I don't have any suggestions for that offhand.

mscdex avatar Jan 15 '17 10:01 mscdex