calxibe / StorjMonitor

Node.js script for publishing data from local Storj nodes to Storjstat.com
15 stars 14 forks source link

Unable to run on Ubuntu 16.04 #12

Closed pixelpox closed 6 years ago

pixelpox commented 6 years ago

Hi,

I am having the following issue with installing the monitoring client. My first issue was that I didn't have npm installed that just returned a error saying npm command not found.

After installing npm and running ./storjmonitor-install.sh my output looks like this

` simon@storage-wars:~/storjmonitor/StorjMonitor-master$ ./storjmonitor-install.sh

/bin/sh: 1: node: not found gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16) 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 4.13.0-32-generic gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/simon/storjmonitor/StorjMonitor-master/node_modules/weak gyp ERR! node -v v4.2.6 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok StorjMonitor@0.0.1 /home/simon/storjmonitor/StorjMonitor-master ├── bindings@1.2.1 ├─┬ dnode@1.2.2 │ └── jsonify@0.0.0 ├── dnode-protocol@0.2.2 ├── jquery@3.1.0 ├── q@0.9.7 ├── requestify@0.2.5 ├── traverse@0.6.6 └── underscore@1.8.3

npm ERR! Linux 4.13.0-32-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE

npm ERR! weak@1.0.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the weak@1.0.1 install script 'node-gyp rebuild'. 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 weak 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 weak npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls weak npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/simon/storjmonitor/StorjMonitor-master/npm-debug.log ` Unfortunately I know nothing about npm so cant undertand the issue very well. I have followed the advice given on another ticket but the install just breaks again. https://github.com/calxibe/StorjMonitor/issues/11

I have made sure that node.js and npm are both installed and updated by doing sudo apt-get update sudo apt-get upgrade

Any help on getting this running would be great. Thanks, Simon

stefanbenten commented 6 years ago

Can you please run:

node -v
npm -v

and post the output? Thank you!

pixelpox commented 6 years ago

Hi Stefan,

I have been working on this as you replied and think i might be closer to a solution by following this webpage

I noticed that the node -v command didn't work and as suggested by the ubuntu i ran sudo apt install nodejs-legacy

I also ran sudo npm install npm@latest -g

To answer your question here is the output;

simon@storage-wars:~$ node -v v4.2.6 simon@storage-wars:~$ npm -v ERROR: npm is known not to run on Node.js v4.2.6 Node.js 4 is supported but the specific version you're running has a bug known to break npm. Please update to at least 4.7.0 to use this version of npm. You can find the latest release of Node.js at https://nodejs.org/

I am currently working on getting nodejs updated

stefanbenten commented 6 years ago

Thanks for the info! Did you get any further?

pixelpox commented 6 years ago

Hi Stefan,

Sorry no I've not been able to spend any more time on this. I did try to get npm updated per the command line output without success.

But noticed that the monitoring software still collects the information so it is working but not in an ideal way.

If you know a way I can get up to v4.7.0 for nosejs I would be grateful for a solution. However seeing as I can get the software running I can always take my issue else where and consider this resolved.

Thanks, Simon

MrTechGadget commented 6 years ago

I think you want to apt install nodejs, not nodejs-legacy. V6.9.4 is the LTS version On Fri, Feb 23, 2018 at 4:20 AM pixelpox notifications@github.com wrote:

Hi Stefan,

Sorry no I've not been able to spend any more time on this. I did try to get npm updated per the command line output without success.

But noticed that the monitoring software still collects the information so it is working but not in an ideal way.

If you know a way I can get up to v4.7.0 for nosejs I would be grateful for a solution. However seeing as I can get the software running I can always take my issue else where and consider this resolved.

Thanks, Simon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/calxibe/StorjMonitor/issues/12#issuecomment-367954253, or mute the thread https://github.com/notifications/unsubscribe-auth/AQVLdfG9mzX0dFSQ1yEWn1CAMF9NrfbZks5tXoLHgaJpZM4SLqui .

stefanbenten commented 6 years ago

@pixelpox Did you install the nodejs packet as @audioeng suggested?

pixelpox commented 6 years ago

@audioeng , @stefanbenten ,

Sorry I didn't mean to be rude, I did not see the email notification to say I had a message from Joshua.

I'VE SOLVED IT.

I noticed that under Ubuntu 16.04 the nodejs in the repository is fairly old. I followed this guide

This showed me the way to add the Nodejs v8 repo and update NodeJS past the standard version that is set in apt.

Thank you both in assisting me