Modifying $PATH variable

后端 未结 3 2104
攒了一身酷
攒了一身酷 2021-02-08 13:44

Trying to install node.js.

Did brew install node

It seems to have worked.

However, received this message upon its completion

3条回答
  •  离开以前
    2021-02-08 14:36

    The cleanest solution is adding the following between the two lines you posted:

    export PATH="/usr/local/share/npm/bin:$PATH"
    

    That way everything stays readable and you prepend it to PATH just like the program suggested it. And if you ever want to undo the change you just remove that line instead of editing a possibly long line.

提交回复
热议问题