Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/Questions/Quick solution to fix: ''zsh command not found brew'' error.
Next
Answered
viviankuphal
  • 15
viviankuphal
Asked: June 12, 20222022-06-12T22:02:37+00:00 2022-06-12T22:02:37+00:00In: Error

Quick solution to fix: ”zsh command not found brew” error.

  • 15

Good day, everyone! I’m facing up with: ”zsh command not found brew” error for some days, but I have not found the answer yet. Here is the detail program which I run:

Last login: Sun Jun 6 12:42:43 on ttys000

[[email protected] ∼ % brew

zsh: command not found: brew

[email protected] ∼ % brew

Then it give me a warning message:

zsh: command not found: brew error

I read lots of documents, but I have not found the best solution to fix this error. Please give me some advice to solve it. Thanks!  

zsh command not found brew
  • 1 1 Answer
  • 17k Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-12T22:52:32+00:00Added an answer on June 12, 2022 at 10:52 pm

    The cause:

    After I examined your progarm for a while, I found that there were 2 problem:

    1, After you installed brew in macOS it was saved at the location – /opt/homebrew.

    2, You did not set the path for brew installation.

    Therefore, your error happend.

    Solution:

    To solve this error, first the brew command that you need have to be runned to the location of cd, then  go into the bin folder and run the brew commands again.

    Another solution is adding the path of brew installation in the .zshrc file by these steps:

    1, Use the command: nano ~/.zshrc to open the .zshrc file.

    2, Add:  export PATH="$PATH:/opt/homebrew/bin/" to the file.

    3, Use Enter press Control + X to save the file.

    4, Use command: source ~/.zshrc to apply changes.

    export Path=''$PATH:/opt/homebrew/bin/''
    [email protected] ∼ % brew
    Example usage:
    brew search TEXT|/REGEX/
    brew info [FORMULA|CASK...]
    brew install FORMULA|CASK...
    brew update
    brew upgrade [FORMULA|CASK...]
    brew uninstall FORMULA|CASK...
    brew list [FORMULA|CASK...]
    
    Troubleshooting:
    brew config
    brew doctor
    brew install --verbose --debug FORMULA|CASK
    
    Contributing:
    brew create URL [--no-fetch]
    brew edit [FORMULA|CASK...]
    
    Further help:
    brew commands
    brew help [COMMAND]
    man brew
    https://docs.brew.sh
    [email protected] ∼ %

    Now the brew command can be runned from anywhere.  

    • 20
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.