Homebrew have to be reinstalled everyday - bash

I install brew on my macOS Ventura, I use it and next day im trying to run brew again and it says brew command not found and I have to reinstall it...
I just install it every time I need it...

Related

purpose of brew update before brew install

Most places recommend running a brew update before a brew install. as such:
brew update
brew install <package_name>
What is the purpose of first running a brew update?
I've done installs without updates several times and it worked fine
You don't really need to do brew update before brew install. The brew install command automatically updates the resources (that's what brew update does) before installing anything.

why can't I install watchman using brew command?

I'm trying to run a react native app and I've been told I need to download "watchman".
When I tried to run the command brew install watchman it gave this error:
Error: The following formula cannot be installed from bottle and must be
built from source.
python#3.9
Install the Command Line Tools for Xcode 11.3.1 from:
https://developer.apple.com/download/more/
Do I need to install Xcode or I'm just missing something? Is there any easier way to install watchman?
Thank you in advance.
If you don't mind, you can try installing directly from Facebook's Homebrew Tap:
brew tap facebook/fb
brew update
brew install facebook/fb/watchman

How do I install the latest developer package for wine with homebrew? (wine-3.0-rc2)

When I type in:
brew install wine
That should install Wine 2.0.3, right? (the latest release)
But I want to install a specific version of wine: wine 3.0 rc2
What would the command to do this be if I'm using homebrew? I've tried
brew install wine-devel
But it gives me this error:
Error: No available formula with the name "wine-devel"
Any help? Thanks!
Currently wine-devel has been moved to caskroom/versions. Therefore in order to install wine-devel you have to
Tap caskroom/versions, by running brew tap caskroom/versions
Update homebrew (...just to be sure) by running brew update
Finally install wine-devel by running brew install caskroom/versions/wine-devel
caskroom/versions was moved to homebrew/cask-versions.
The following will work:
brew tap homebrew/cask-versions
brew install homebrew/cask-versions/wine-devel
You will be asked for your password.
Then you should be able to start executables as follows:
wine /path/to/app.exe
I was trying to install wine-devel, but ran into a similar problem. It seems that the answers here may each have been relevant on a different year, as the casks have moved around back and forth. So here's the latest on the situation, and some info on how to handle it in future.
The official instructions (as of 4th April 2020) say to run brew cask install wine-stable. However, that leads to an error:
$ brew cask install wine-stable
Error: Cask wine-staging exists in multiple taps:
homebrew/cask-versions/wine-staging
caskroom/versions/wine-staging
This means that two potential casks were found, each with the same name, yet each on a different repository, and Homebrew was unsure which one to install.
Running this command gave me a clue about what was going on:
$ brew tap caskroom/versions
Error: caskroom/versions was moved. Tap homebrew/cask-versions instead.
So I learned that you can untap third-party repositories, and untapped the one that the message seemed to advise not to tap WINE casks from.
$ brew untap caskroom/versions
Untapping caskroom/versions...
Untapped 156 casks (463 files, 56.7MB).
$ brew cask install wine-stable
... Success!
To install the development version just pass --devel
brew install --devel wine

Installing GLFW on OSX

I've been all over the internet and I simply cannot find a way to install GLFW for OSX and use it with Xcode. A lot of articles use cmake for this, which I tried to install but I still can't access it from the terminal.
I just need a simple step-by-step guide for installing it because I'm going to lose my mind.
Thanks
I use homebrew to install GLFW. Once brew has been configured, use the commands
brew tap homebrew/versions
brew install --build-bottle --static glfw2
If you are still running into trouble with this and want to use homebrew, change the install command to reflect the newer GLFW version (3 as of this writing)
brew tap homebrew/versions
brew install --build-bottle --static glfw3

Missing formulas in broken homebrew

After doing a Ctrol+C on a 'brew update' command, can't see all available formulas (searching with brew search command, E.g any php package)
I've tried with brew doctor and cleanup commands without any luck.
How can I fix this without uninstalling brew and all its programs?
I'm wondering about this as well. I switched to an older version of scala, now the formula is missing and I can't install the latest version. I'm going to uninstall and reinstall homebrew for a quickfix for now.

Resources