whenever I try to use anything brew related, or even just type brew on my computer, this error appears:
"/usr/local/Library/Homebrew/version.rb:186:in `initialize': Version value must be a string (TypeError)
from /usr/local/Library/Homebrew/os/mac/version.rb:24:in `initialize'
from /usr/local/Library/Homebrew/os/mac.rb:15:in `new'
from /usr/local/Library/Homebrew/os/mac.rb:15:in `version'
from /usr/local/Library/brew.rb:31:in `<main>'"
I am fairly new to developing, so I may be asking a stupid question, and I do not know what to try next.
There are similar questions related to what you have right now. Here are some things that you can try:
Upgrade homebrew, run the following lines in sequence:
brew update-reset
brew upgrade
Or Re-install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After doing either options above you can test if homebrew is working by running the following in your terminal:
brew --version
For good measure try running the following after all other steps mentioned:
brew doctor
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.