asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
659 stars 182 forks source link

Installation fails on Raspberry Pi #136

Closed ghost closed 6 years ago

ghost commented 6 years ago

I followed the build instructions in the README:

git clone https://github.com/vibornoff/asmcrypto.js.git
cd asmcrypto.js/
npm install

And got the following error, indicating there's no suitable binary for PhantomJS for the Pi's linux/arm architecture:

pi@raspberrypi:~/workspaces/asmcrypto.js $ npm install
npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead
npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

> phantomjs-prebuilt@2.1.16 install /home/pi/workspaces/asmcrypto.js/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install 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!     /home/pi/.npm/_logs/2018-01-02T10_49_05_960Z-debug.log
alippai commented 6 years ago

This will be fixed on the ES6 branch as I changed the PhantomJS dependency to Puppeteer. You won't be able to run the tests (https://github.com/GoogleChrome/puppeteer/issues/550), but the install should work.

ghost commented 6 years ago

Super, thanks. And btw, the was behind my initial problems installing for node which I mentioned in https://github.com/asmcrypto/asmcrypto.js/issues/114 so please disregard. I've built on Windows with CCM enabled and copied the asmcrypto.all.js file into my project and it's working nicely from what I see of initial tests.

alippai commented 6 years ago

Does it work with 0.17.0?

ghost commented 6 years ago

Yes, works great and I noticed it automatically builds asmcrypto.all.js as well, which is useful for me. Ran npm install on Raspberry Pi and performed a quick CCM encrypt / decrypt test. All good.

Thanks @alippai :-)

Not sure of your rules so I'll leave it to you to close this when you see fit.