简体   繁体   English

确保 /usr/local/bin 在 mac 上的 $PATH 中

[英]Making sure /usr/local/bin is in my $PATH on mac

I've installed node.js for Macintosh using the lastest installer for Macintosh.我已经使用最新的 Macintosh 安装程序为 Macintosh 安装了 node.js。 I now want to check that /usr/local/bin is in my $PATH, as the installer instructed.我现在想按照安装程序的指示检查 /usr/local/bin 是否在我的 $PATH 中。 I've opened up the Terminal application and researched help on the net, but I'm lost, as to how to accomplish the above, then start the node.js process.我已经打开终端应用程序并在网上研究了帮助,但我迷失了,至于如何完成上述操作,然后启动 node.js 进程。 Can anyone clear this up?任何人都可以解决这个问题吗? Thank you for very much.非常感谢。

echo $PATH will print your path. echo $PATH将打印您的路径。 If you see /usr/local/bin between some colons, then it's in your path.如果您在某些冒号之间看到/usr/local/bin ,那么它就在您的路径中。

open terminal and type the command below打开终端并输入下面的命令

echo $PATH

You should see something like this你应该看到这样的东西

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

the presence of /usr/local/bin in the output means you are good to go /usr/local/bin在输出中的存在意味着你很高兴

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mac的Git安装程序:为什么/ usr / local / git / bin在我的PATH中? - Git installer for Mac: Why is /usr/local/git/bin in my PATH? 如何在 Mac 上的 $PATH 中添加 /usr/local/bin - How to add /usr/local/bin in $PATH on Mac 路径,/usr/bin/ 和 /usr/local/bin/ - Path, /usr/bin/ and /usr/local/bin/ Mac 上的 jenkins,路径设置不正确,没有 /usr/local/bin - jenkins on Mac, PATH is not set right, no /usr/local/bin 如何使用ActivePerl 5.20 Mac OS X(/ usr / bin / perl)而不是/ usr / local / ActivePerl…的默认路径? - How to use default path for ActivePerl 5.20 Mac OS X (/usr/bin/perl) instead of /usr/local/ActivePerl…? $ usr是正确的/ usr / bin /在/ usr / local / bin /之前 - /usr/bin/ before /usr/local/bin/ while $PATH is correct $ PATH中的/ usr / bin和/ usr / local / bin等的顺序 - Order of /usr/bin and /usr/local/bin and more in $PATH 将/ usr / local / bin添加到从MAC OS上运行的JAVA中的System.getenv(“ PATH”)获取的$ PATH中 - add /usr/local/bin to $PATH got from System.getenv(“PATH”) in JAVA run on MAC OS 自制链接python到/ usr / local / bin /在Mac上 - Homebrew link python to /usr/local/bin/ on Mac 在Mac OSX上将/ usr / local / bin(homebrew)添加到pt-config的QtCreator搜索路径 - Adding /usr/local/bin (homebrew) to QtCreator search path for pkg-config on Mac OSX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM