Homebrew Big Sur



  1. Homebrew Big Sur Issues
  2. Homebrew And Big Sur
  3. Homebrew Big Sur Ranch

Every developer knows about the Homebrew package manager that makes it really easy to install, update applications, and utilities on a Mac. The installation of homebrew remains the same for the new macOS version BigSur, but we will explain how to it anyway in this article.

Note for ARM processors users

This does not work on macOS Big Sur – Version 11.1 Beta (20C5048k) with Xcode Version 12.2 (12B45b). Apple responds that it “Can’t install the software because it is not currently available from the Software Update server.”. I upgraded from Mohave to Big Sur and found that homebrew is not working any more. I installed the command line tools using the command xcode-select -install After I run brew list, I get the foll.

If your Mac uses the Apple Silicon (M1 Chip), you will have a problem with the installation till the date of publication of this article. You can read in this another article how to solve the issue of Homebrew that doesn't run on the M1 chip.

Nexus 2 setup dmg downloadminew. If your processor has an Intel-based processor, then you can follow the tutorial without any inconvenience (which is short anyway).

Installing Homebrew

Openjdk@11: 11.0.10: Development kit for the Java programming language: openjdk@8: 1.8.0+282: Development kit for the Java programming language. Beta 8 of iOS 14.5, iPadOS 14.5, macOS Big Sur 11.3 Available for Testing - Apple Event Scheduled for April 20 - Beta 7 of macOS Big Sur 11.3 Available for Testing - Beta 7 of iOS 14.5 & iPadOS 14.5 Released for Testing - Beta 6 of iOS 14.5, iPadOS 14.5, macOS Big Sur 11.3 Available for Testing. Install and take a look at the Homebrew pymol package as an example. Step-by-Step Instructions For Installing Homebrew. For Big Sur, you have to install into /opt. This is actually the 'correct' place for this stuff, and Apple no longer permits you to do otherwise. Let's make a directory for it: cd /opt sudo mkdir homebrew.

Start by opening the Terminal and start the homebrew setup by simply downloading the installation script of homebrew with curl and then running it with bash. You can easily do this with a single command like this:

The installation script does a variety of stuff as setting the installation directory and so on. After running the command, the terminal will probably prompt for your password if it's required. Then, the installation will take a while and once it finishes, you can easily verify if it works running the following instruction:

Brew m1

The command should generate the following output:

Happy coding ❤️! Lil baby yes indeed download.

Sur

Homebrew Postgres on Big Sur

I recently ran into an issue with Postgres after upgrading to Big Sur. This is pretty typical for me after OS updates; the feedback loop between updates is too long for my memory. After flailing and staring at countlessStackOverflowthreads, I found my way out of the woods. Here’s my particular breadcrumb trail.

After starting my local Rails server after the OSX upgrade, I was greeted with the dreaded error “connection to database failed: could not connect to server: No such file or directory”. I rushed through my typical fix of deleting the postmaster.pid which usually gets left behind when my machine restarts only to find that this can cause worse problems when done incorrectly. I then when through my typical debugging questions:

  1. Which install of Postgres am I running?
  2. And which version of Postgres am I running?

Debugging

Brew big sur

When I get stuck, I take a deep breath and gather up my assumptions. In this case, I know that Postgres can be installed a number of different ways, and I want to verify how the software is installed. I like installing Postgres via homebrew. With a quick command in the terminal, which postgres, I see that it’s installed in /usr/local/bin which I know is where homebrew installs. Next, I check the version with postgres --version and I get back 13.x which is not the 12.x I expected.

Now I had two options:

  1. Bring my install up to the latest, 13.x or
  2. Revert my install to 12.x.

I’m a believer in intentional upgrades and intentional changes. I want to minimize the surface area and variables between known working versions of my software. The best way to do that would be to walk my local copy back to 12.x.

Downgrading Postgres

This was the trickiest part. I needed to install 12.x and then point homebrew at the install.

Installing the older version of Postgres wasn’t too bad. brew install postgres@12.5got the old version my app was expecting onto my machine. But checking the postgres version still returned the new Postgres install. That makes some sense. Homebrew wasn’t installing the old version of Postgres over the existing 13.x. It was allowing both to be installed on my machine. After fumbling with a few commands and various Stack Overflow posts, I discovered brew link --overwrite postgresql@12. This pointed the postgres command at the latest version. Checking the version through the terminal confirmed this. But we’re not quite there yet.

Running Postgres

Homebrew Big Sur Issues

Finally, I had to restart Postgres. I began by checking which brew services were running with brew services list. From here, I could see that postgres@12 was stopped. A quick start kicked the service off brew services start postgresql@12. It’s important to note that even though I had linked brew to the old postgres version, when I was running brew commands, I still needed to reference the appropriate brew Postgres install, hence the @12.

Next Steps

Homebrew

With this, I could restart Rails and get my app up and running again. A few notes:

Homebrew Big Sur
  • Postgres 13 is still installed on my machine. I should remove it or otherwise plan on upgrading my app to it. I’m really unsure of what state the install is in, and it’s likely to trip me up in the future if I don’t handle it here while I have this context in my hed.
  • I went this route as I really wanted to hold on to the data I had in my local DBs. If I was just getting started or I didn’t care about losing that data, I likely would have blown everything away and run rails db:prepare and been up and running with Postgres 13.

Homebrew And Big Sur

Hopefully, you see some of your own Postgres situation in my particular path, and you can hop on somewhere and get to your own solution. If not, reach out. I’d love to learn more about how to debug Postgres installs.

References

Homebrew Big Sur Ranch