dundalek/closh

Unable to Install Standalone on Ubuntu 16.04

jcburley opened this issue · 4 comments

I'm hitting errors I don't understand (as I'm very new to all this) following the main page's install instructions:

[1] craig@doe:~/tmp/closh$ ll
total 0
[1] craig@doe:~/tmp/closh$ node -v
v9.11.2
[1] craig@doe:~/tmp/closh$ npm -v
5.6.0
[1] craig@doe:~/tmp/closh$ npm install -g closh
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
[1] craig@doe:~/tmp/closh$ sudo npm install -g closh

> closh@0.2.2 preinstall /usr/lib/node_modules/closh
> node scripts/check-requirements

/usr/bin/closh -> /usr/lib/node_modules/closh/bin/closh.sh

> deasync@0.1.13 install /usr/lib/node_modules/closh/node_modules/deasync
> node ./build.js

`linux-x64-node-9` exists; testing
Binary is fine; exiting

> lumo-cljs@1.9.0-alpha install /usr/lib/node_modules/closh/node_modules/lumo-cljs
> node scripts/npm_install.js || nodejs scripts/npm_install.js

internal/streams/legacy.js:57
      throw er; // Unhandled stream error in pipe.
      ^

Error: EACCES: permission denied, open 'lumo_linux64.zip'
internal/streams/legacy.js:57
      throw er; // Unhandled stream error in pipe.
      ^

Error: EACCES: permission denied, open 'lumo_linux64.zip'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lumo-cljs@1.9.0-alpha install: `node scripts/npm_install.js || nodejs scripts/npm_install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lumo-cljs@1.9.0-alpha 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/craig/.npm/_logs/2018-08-13T07_20_24_901Z-debug.log
[1] craig@doe:~/tmp/closh$

Note that I tried the non-sudo variation, as shown literally on the main page, as well as prefixing it with sudo, and they both failed (but for different reasons).

What am I doing wrong? Are the instructions perhaps outdated?

Exploring further, this appears to be an issue with lumo, not closh, as I cannot get just this to work:

[1] craig@doe:~/tmp/closh$ npm install -g lumo-cljs

(With or without sudo, though it fails in yet different ways....)

For those having a similar problem, following the instructions here:

https://github.com/anmonteiro/lumo

Turns out adding --unsafe-perm got it to install.

Had to do that for sudo npm install -g closh --unsafe-perm as well!

Thanks for reporting this and finding a solution. I updated the readme to include this.

I had the same issue plus a missing system library. I've documented my steps here anmonteiro/lumo#414