cozy-labs / cozy-light

Personal Server Made Easy
http://cozy-labs.github.io/cozy-light/
GNU Affero General Public License v3.0
104 stars 13 forks source link

Install fail on RPi #76

Closed y-lohse closed 9 years ago

y-lohse commented 9 years ago

Hey guys, similarly to #70, cozy-light installation fails for me on the RPi (except I have enough storage).

Here's the error:

pi@raspberrypi / $ sudo npm install -g cozy-light
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
\
> leveldown@0.10.4 install /usr/local/lib/node_modules/cozy-light/node_modules/p               ouchdb/node_modules/leveldown
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/roo               t/.node-gyp/0.12.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/               node_modules/cozy-light/node_modules/pouchdb/node_modules/leveldown/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: node-v0.12.0.tar.gz local checksum 2b4360f62ed37530feb8c8b               9f48e8faf0779ea1512864c525bab5d3561db02c3 not match remote 9700e23af4e9b3643af48               cef5f2ad20a1331ff531a12154eef2bfb0bb1682e32
gyp ERR! stack     at deref (/usr/local/lib/node_modules/npm/node_modules/node-g               yp/lib/install.js:299:20)
gyp ERR! stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/n               pm/node_modules/node-gyp/lib/install.js:340:13)
gyp ERR! stack     at IncomingMessage.emit (events.js:129:20)
gyp ERR! stack     at _stream_readable.js:908:16
gyp ERR! stack     at process._tickCallback (node.js:355:11)
gyp ERR! System Linux 3.18.7+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/b               in/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/cozy-light/node_modules/pouchdb/node_mo               dules/leveldown
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.18.7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cozy-li               ght"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! leveldown@0.10.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leveldown@0.10.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the leveldown 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 their info via:
npm ERR!     npm owner ls leveldown
npm ERR! There is likely additional logging output above.

Interestingly, installingleveldown on irt's own works fine. Any clues?

nicodel commented 9 years ago

Hi y-lohse, Did you have any previous install of cozy on this RPI ?

nicodel commented 9 years ago

I forgot but at some point I did a sudo npm cache clean. Maybe it helped.

frankrousseau commented 9 years ago

@nicodel It looks like the it's the same permission error you had here: https://github.com/cozy-labs/cozy-light/issues/70

You hard drive was full.

nicodel commented 9 years ago

@frankrousseau Yes, and to free some space, I did a lot of clean everywhere... As @y-lohse have the same error message but with free space on his /. I am trying to remenber what I did :)

y-lohse commented 9 years ago

Nope, it's a fresh Raspbian install. Only installed node & npm, otherwise it's the stock version. Trying the npm cache clean now, but the whole process takes a while :)

@frankrousseau Note that I don't think the permission error (WARN EACCES user "root" does not have permission to access...) is the actual problem. Installing leveldown standalone produced the same error but then went on to compile properly.

The errors differ afterwards; #70 had

gyp ERR! configure error gyp ERR! stack Error: ENOSPC, mkdir '/usr/local/lib/node_modules/cozy-light/node_modules/pouchdb/node_modules/leveldown/.node-gyp'

Which seems logical if there's no disk space for another folder. I have

gyp ERR! configure error gyp ERR! stack Error: node-v0.12.0.tar.gz local checksum 2b4360f62ed37530feb8c8b 9f48e8faf0779ea1512864c525bab5d3561db02c3 not match remote 9700e23af4e9b3643af48 cef5f2ad20a1331ff531a12154eef2bfb0bb1682e32

Never seen that before but haven't investigated too much yet.

nicodel commented 9 years ago

The version of node I installed is 0.10.26. I saw yours is 0.12.0... maybe it is a related ?

y-lohse commented 9 years ago

Awesome, npm cache clean did the trick!

Yes, I think it could be related to the node version (btw, the heroku url in the readme doesn't work anymore). Why it compiled as a standalone but not as a dependency is beyond me, but whatever. Thanks!

Now, on to the actual apps.

nicodel commented 9 years ago

That's good news. I am going to update the docs, and suggest a npm cache clean before lauching the installation of cozy-light. Have fun with the apps !

y-lohse commented 9 years ago

FWIW, I found further problems. Installing cozy-labs/emails went only moderately well, and afterwards both npm & cozy-light were termianting with segmentation fault.Not sure what exactly is causing this behavior, but there's a pretty nasty bug in node 12.0 and the RPi.

I'm giving it a shot with a 10.x version now, see if that goes any better.