问题描述
限时送ChatGPT账号..我刚刚安装了 Home-brew,现在我试图通过在终端中输入两个命令来将 home-brew 目录插入到我的路径环境变量的顶部.我的问题是:
I just installed Home-brew and now I'm trying to insert the home-brew directory at the top of my path environment variable by typing in two commands inside my terminal. My questions are these:
什么是路径环境变量?
提供给我的两个代码是否正确?
Are the two codes provided me correct?
echo "export Path=/usr/local/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile
在此之后,我将输入 brew doctor.就我所见,什么都没有发生.谁能给我一些建议或方向?
After this I am to type in brew doctor. Nothing is happening as far as I can see. Can anyone offer me some advice or direction?
推荐答案
我在我的新 Mac M1 中安装了 brew,并要求我将 /opt/homebrew/bin
放在路径中,所以正确这种情况下的命令是:
I installed brew in my new Mac M1 and ask me to put /opt/homebrew/bin
in the path, so the right command for this case is:
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile
这篇关于将自制程序添加到 PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论