简体   繁体   English

在新 Mac 上安装自制软件时遇到问题

[英]Trouble installing homebrew on New Mac

Once I install homebrew on my terminal it works.一旦我在我的终端上安装了自制软件,它就可以工作了。 But when I close the terminal and reopen to use brew, it cannot find the command.但是当我关闭终端并重新打开使用 brew 时,它找不到命令。

On reopening the terminal it says:在重新打开终端时,它说:

/Users/abc/.zshrc:export:2: not valid in this context: Support/JetBrains/Toolbox/scriptseval:/opt/homebrew/bin:/opt/homebrew/bin

This is what my.zprofile looks like after installing homebrew using the official docs:这是使用官方文档安装自制软件后 my.zprofile 的样子:

# Added by Toolbox App
export PATH="$PATH:/Users/anshgupta/Library/Application Support/JetBrains/Toolbox/scripts"
eval "$(/opt/homebrew/bin/brew shellenv)"

Please explain why does it not recognise that I have installed it and how can I fix this请解释为什么它不能识别我已经安装了它,我该如何解决这个问题

OnTerminal,在终端上,

  ~ % git clone https://github.com/Homebrew/brew homebrew        
    
  ~ % eval "$(homebrew/bin/brew shellenv)"
    
  ~ % brew update --force --quiet

  ~ brew update
    Already up-to-date.

Here brew installation documentation link - https://docs.brew.sh/Installation这里 brew 安装文档链接 - https://docs.brew.sh/Installation

Try putting the line eval "$(/opt/homebrew/bin/brew shellenv)" to the top of the file, save it and restart your terminal.尝试将eval "$(/opt/homebrew/bin/brew shellenv)"行放在文件顶部,保存并重新启动终端。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM