LoginSignup
6
4

More than 5 years have passed since last update.

Ubuntu に node.js インストールしたのに command not found: node と言われて困ったときの対応方法 ヽ(゚ー゚*ヽ)(ノ*゚ー゚)ノわぁい

Posted at

久しぶりに、Ubuntu14.4にNode.jsインストールしたのに、command not found :scream: と言われて :sweat: 焦ったのでメモ :sweat_drops:

解消方法

インストールした後

sudo apt-get install nodejs
nodejs -v

シンボリックリンクをつくります

sudo ln -s /usr/bin/nodejs /usr/bin/node

なんで node が command not found なの?

apt-get install node は駄目

apt-get でインストールできる node っぽいものに

nodejs
node

というのがあったりします :confused: で、この node というのは別の何かで、node.js とは関係無し。これが /usr/bin/node にインストールされるようです。

update-alternatives というのもあるらしい・・・

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

と言うやり方もあるらしいのですが :smile: 試していないので、、、参考リンクはります :thumbsup:

参考リンク

6
4
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
6
4