LoginSignup
10
2

More than 5 years have passed since last update.

Elmをインストールできないとき(Ubuntu)

Posted at

sudo npm i -g elm --unsafe-perm=true --allow-rootでインストールできます。

環境

Ubuntu 16.04 LTS
npmがインストール済み

エラーメッセージ

$ sudo npm i -g elm@^0.18.0

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

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

Error extracting linux-x64.tar.gz - Error: EACCES: permission denied, mkdir '/usr/local/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!     /home/takeyuki/.npm/_logs/2017-09-30T09_26_44_798Z-debug.log

解決法

以下のコマンドでインストールできます。

sudo npm i -g elm --unsafe-perm=true --allow-root

参考

10
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
2