Closed teropes closed 8 years ago
Hi, sry for the late response. Can you check your python version that is installed for the non-root user? 2.7.3 or newer(not 3.x) is necessary for node-gyp.
python --version outputs 2.7.8. My /usr/local/bin/python is symlink to /usr/local/bin/python2.7 and I havent got issues with building other packages in this project such as oracledb. I also tried with my other development machine which runs Oracle Linux 6.5 and got same issue there.
Here is my npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/home/sysuser/.nvm/versions/node/v0.12.7/bin/node',
1 verbose cli '/home/sysuser/.nvm/versions/node/v0.12.7/bin/npm',
1 verbose cli 'rebuild',
1 verbose cli 'node-snap7' ]
2 info using npm@2.11.3
3 info using node@v0.12.7
4 info readInstalled object
5 verbose rebuild path, id [ '/data/my-project/node_modules/node-snap7',
5 verbose rebuild 'node-snap7@0.2.1' ]
6 silly rebuild set [ '/data/my-project/node_modules/node-snap7' ]
7 info build /data/my-project/node_modules/node-snap7
8 info preinstall node-snap7@0.2.1
9 info linkStuff node-snap7@0.2.1
10 silly linkStuff node-snap7@0.2.1 has /data/my-project/node_modules as its parent node_modules
11 verbose linkBins node-snap7@0.2.1
12 verbose linkMans node-snap7@0.2.1
13 verbose rebuildBundles node-snap7@0.2.1
14 verbose rebuildBundles [ 'bindings', 'nan' ]
15 info install node-snap7@0.2.1
16 verbose unsafe-perm in lifecycle true
17 info node-snap7@0.2.1 Failed to exec install script
18 verbose stack Error: node-snap7@0.2.1 install: node-gyp rebuild
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.node-gyp rebuild
26 error Exit status 1
27 error Failed at the node-snap7@0.2.1 install script 'node-gyp rebuild'.
27 error This is most likely a problem with the node-snap7 package,
27 error not with npm itself.
27 error Tell the author that this fails on your system:
27 error node-gyp rebuild
27 error You can get their info via:
27 error npm owner ls node-snap7
27 error There is likely additional logging output above.
28 verbose exit [ 1, true ]
Can you check if the binding.gyp contains CRLF or LF line endings? I'm on my phone right now. I'm developing under Windows and maybe the CRLF slipped in.
My text editor on my dev machine (Sublime Text 3) shows Line Endings as "Windows" so that may indeed be the issue.
Yes, there is something wrong indeed. On Github line endings are ok because of git's autoCRLF I think but npm uploaded the DOS/Windows line endings :( I'm about to release a new version anyway and will have a special look on LE this time. You can try install from github (e.g. npm install mathiask88/node-snap7
) or wait until the new version is published. Thanks for your report!
@teropes I published a new release to npm that fixed the line endings and is compatible to node 4.x. Would be cool if you can test it and report back.
node-snap7 0.2.2 now builds properly also as non-root user in both of my Centos / Oracle Linux dev machines and no other issues detected so far. This is now fixed, cheers!
I'm getting the following build error when installing node-snap7. Im operating on Centos 6 and trying to install as non-root user. Running on node 0.12.7, also tried with 0.10.40. Installing as root works. Is there any way to avoid installing this package as root?