elm-lang / elm-platform

Bundle of all core development tools for Elm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Global Elm install on Ubuntu 16.04 LTS failing

opened this issue · comments

(Nodejs v9.11.1 on Ubuntu 16.04.04 LTS)

Over the past few months, I have tried repeatdely to install elm with the following command
sudo npm install -g elm

It keeps failing to install.

Every time I try to install, similar error output is given.

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/bin/elm -> /usr/lib/node_modules/elm/binwrappers/elm
/usr/bin/elm-make -> /usr/lib/node_modules/elm/binwrappers/elm-make
/usr/bin/elm-package -> /usr/lib/node_modules/elm/binwrappers/elm-package
/usr/bin/elm-reactor -> /usr/lib/node_modules/elm/binwrappers/elm-reactor
/usr/bin/elm-repl -> /usr/lib/node_modules/elm/binwrappers/elm-repl

> elm@0.18.0 install /usr/lib/node_modules/elm
> node install.js

Error extracting linux-x64.tar.gz - Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/elm/Elm-Platform'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elm@0.18.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the elm@0.18.0 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!    ~/.npm/_logs/2018-04-17T15_41_03_313Z-debug.log

(I've uploaded the log file to bitbucket here)

Have you asked around on the Elm slack channel? http://elmlang.herokuapp.com/

If someone there can help figure out the root issue, it may reveal information that helps us resolve anything that may be on our end of this.

I'm going to close and then if (1) no new issue appears I'll assume the Slack helped and if (2) you find something wrong in this repo I'll get a new issue with more details. If all this happened already, I guess just reopen this one.

I fixed it!

npm config set prefix=~/npm
export PATH="$PATH:$HOME/npm/bin" # add to .bash_profile or .bashrc

source: https://medium.com/smalltalk-talk/a-gentle-introduction-to-amber-8c532631e9ab