将自制程序添加到 PATH

编程入门 行业动态 更新时间:2024-10-28 06:29:13
本文介绍了将自制程序添加到 PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-28 06:56:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1169634.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   PATH

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!