Cannot install Resin CLI on ubuntu 16.04

resin-cli

#1

Hello. I’ve installed npm (version 3.5.2) and nodejs (version 4.2.6). This seems to meet the requirements specified in the readme file for installing the CLI. But, when running:
> sudo npm install --global --production resin-cli

I get the error:

drivelist@5.2.6 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the drivelist@5.2.6 install script 'prebuild-install || node-gyp rebuild'.<a class="attachment" href="/uploads/resin/original/1X/a6d5a540e7949b4ee5f6d0b7eaa8a08f2cffbc66.log">npm-debug.log</a> (672.5 KB)
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the drivelist package,
npm ERR! not with npm itself.

I’ve attached the log file. I’d appreciate any help.


#4

Hey @bob,

it’s because the nodejs package set node binary name as nodejs while that package expects it should be node only. So we have 2 solutions here, you can fix it by doing ln -s /usr/bin/nodejs /usr/bin/node or the more Debian/Ubuntu way to do it is apt-get install nodejs-legacy which does the same thing.


#5

Thanks. That took care of it. I appreciate it.