Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install: Error: make libsodium exited with code 2 #6

Open
lboue opened this issue Sep 30, 2018 · 2 comments
Open

npm install: Error: make libsodium exited with code 2 #6

lboue opened this issue Sep 30, 2018 · 2 comments

Comments

@lboue
Copy link

lboue commented Sep 30, 2018

Hello,

Could you tell me how to install hap-client-tool with npm because it doesn't work with the last release:
I can't install it

pi@raspberrypi:~ $ sudo su -      
root@raspberrypi:~# npm install -g hap-client-tool

> sodium@2.0.3 preinstall /usr/lib/node_modules/hap-client-tool/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /usr/lib/node_modules/hap-client-tool/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtoolize:   error: Failed to create 'build-aux'
make: *** [libsodium] Erreur 1
Makefile:61 : la recette pour la cible « libsodium » a échouée
/usr/lib/node_modules/hap-client-tool/node_modules/sodium/install.js:287
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/usr/lib/node_modules/hap-client-tool/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
[            ......] - preinstall: info lifecycle sodium@2.0.3~preinstall: Failed to exec preinstall script
[            ......] - preinstall: info lifecycle sodium@2.0.3~preinstall: Failed to exec preinstall script
[            ......] - preinstall: info lifecycle sodium@2.0.3~preinstall: Failed to exec preinstall script
[            ......] - preinstall: info lifecycle sodium@2.0.3~preinstall: Failed to exec preinstall script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium@2.0.3 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sodium@2.0.3 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-09-30T21_12_49_170Z-debug.log

Regards,

@lboue lboue changed the title Yarn install: ERROR: [Errno 2] No such file or directory: 'global' npm install: Error: make libsodium exited with code 2 Sep 30, 2018
@kamilner
Copy link

kamilner commented Jan 3, 2019

You could try:
npm install -g hap-client-tool --unsafe-perm

The problem appears to be that it needs that flag to allow it to compile the static version of libsodium it uses.

However, I get an error in compilation as follows:

Error: make nodesodium exited with code null
    at ChildProcess.<anonymous> (/usr/lib/node_modules/hap-client-tool/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)

@brentrockwood
Copy link

brentrockwood commented Dec 30, 2019

Installing libsodium separately worked. https://download.libsodium.org/doc/installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants