Uninstalling and Re-Installing homebrew on the Mac - homebrew

MacOS: Ventura 13.1
I have several packages on my Mac installed using Homebrew. I am dealing with a situation, following the update to Ventura 13.1, where the only solution may be to uninstall and re-install Homebrew.
What are my options, if I want to make sure all the tools/apps I installed using Homebrew are re-installed when the process is done?

It should be as simple as:
brew bundle dump
which creates a Brewfile of all your taps and packages, followed by:
brew bundle
which reinstalls everything you had before from the Brewfile.

Related

Xdebug install on macOS

I'm trying to install Xdebug on macOS Catalina but home-brew no longer allowed to run as root. Worked fine before Catalina update.
I was running Xdebug under Mojave but Catalina upgrade broke it. Removed extension to reinstall and then hit hombrew issue: get the following error when running brew as root:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Brew should be working without using sudo.
If that's not the case, your homebrew install is broken and you might need to reinstall it.
In any case brew doctor is something you can always consult.
After you got your homebrew fixed,
looking into Can't install xdebug on Mac with Homebrew might be of help.
Updating homebrew should do the trick -
brew update

brew doctor warnings - delete or ignore?

After I installed Homebrew,
Then I try the brew doctor command, there comes warnings:
Could I know the reasons and How to fix it? Could I just ignore these warnings?
The files reported by brew doctor are added by a software (that you manually installed before installing Homebrew) that uses a library for the Tcl/Tk language.
Homebrew also provides a library for Tcl/Tk and the existing files will conflict with those installed by Homebrew if you install a package that requires the Tcl/Tk library.
You don't have to worry for now and, very important, don't try to "fix" anything (especially don't remove files).
What you can do to "fix" it is to find out what program installed those files (it was not installed using the App Store, you installed it manually) and see if Homebrew provides it. If it is a macOS GUI application then Homebrew doesn't provide it (it contains only command line applications, no GUI) but Homebrew Cask might do it.
Use
$ brew search app
or
$ brew cask search app
If you are lucky and you find it and you are pleased with the version provided by Homebrew then you can uninstall the application using the uninstaller it hopefully provides then reinstall it using Homebrew (or Homebrew Cask).
You can run brew doctor between uninstall and reinstall to make sure the uninstaller removed all the files listed in the output of brew doctor now.
As written at the beginning of brew doctor's output, you can safely ignore these warnings if everything you use Homebrew for works fine.

Error installing Dart Development version on OS X with homebrew

Have installed several versions of Dart on OS X using homebrew.
brew tap dart-lang/dart
brew install dart
Today I did a 'brew upgrade' to Dart 1.11.3 stable, because I want to run cucumber/selenium/chromedriver tests in dartium. Dartium is still at version 39.* and chromedriver wants 40something.
note: windows users are able to run these tests in dartium :(
So, tried installing development version 1.12.0-dev.5.0 to see if dartium would also upgrade. No joy
brew install dart --devel
Warning: dart-lang/dart/dart-1.11.3 already installed
Do I really have to uninstall to install the development version?
Same thing happened to me too.
I solved it with uninstalling dart first:
brew uninstall --force dart
brew install dart --devel --with-dartium --with-content-shell

Reinstalling Xcode on Mountain Lion after upgrading from Lion

I'm running OSX 10.8. My Mac had Snow Leopard when I got it, but I have since upgraded to Lion and then Mountain Lion. I'm trying to get my Ruby on Rails environment set up, and when I run Homebrew's "brew doctor" command, I get this:
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 5.0.1.
Warning: Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.
So I uninstalled and reinstalled Xcode (now have v 5.0.2) and the command line tools, and I'm still getting the same messages. I've tried doing:
sudo /Developer/Library/uninstall-devtools --mode=xcodedir
But I get this in response:
sudo: /Developer/Library/uninstall-devtools: command not found
Thanks in advance for any help.
Try which gcc to figure out which gcc you are using.
Then run which -a gcc to see all the gcc's that you have installed.
You'll probably find that you're using the osx version and that changing your path ordering in shell config, eg. bash.rc will fix this brew doctor error.

PhantomJS version 1.4.0 version issue

I installed PhantomJS today and got this error trying to use it:
PhantomJS version 1.4.0
is too old. You must use at least version 1.7.0
(Capybara::Poltergeist::PhantomJSTooOld)
How can I install the newer version?
I can get the newer version (1.7) at: http://phantomjs.org/download.html
Once I've downloaded it though how do I actually install it?
Are you using Linux or OS X? You'll need to either build from source or install an updated PhantomJS package. You can also download the binaries and install over the system installed PhantomJS. Type "which phantomjs" and it should show the location of PhantomJS.
If you're using homebrew, just:
brew upgrade phantomjs
I had to solve this problem yesterday, it required me updating brew, telling brew to uninstall phantomJS, then updating xcode, then installing the latest xcode command utilities, then using brew to re-install phantomjs. Finally that got it to pull in the latest version. You might try this (mac):
brew update
brew uninstall phantomjs
brew doctor (follow the fixes it recommends if any... Mine was updating xcode)
brew install phantomjs
At that point it should grab the latest.
Good luck!

Resources