liveBook · Manning

Chapter 2: Installing and using Homebrew

What you will learn in chapter 2 of Build Applications with Local AI Models on a Mac

The chapter introduces Homebrew as the macOS package manager used to install developer tools throughout the book.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduces Homebrew as the macOS package manager used to install developer tools throughout the book.

Key terms: Homebrew, package manager

2.1 Package managers: App stores for developers

Introduces Homebrew as a macOS package manager and explains why it is easier than installing developer tools manually.

Key terms: package manager, Homebrew, packages, terminal, version compatibility, dependencies, updates

2.2 Installing Homebrew

Introduces installing Homebrew with a terminal command and advises where to find an updated command if the printed one changes.

Key terms: Homebrew, terminal, installer, https://brew.sh

2.2.1 Understanding the command

Explains how the Homebrew installation command downloads and immediately runs a script, and why its source matters.

Key terms: curl, command substitution, Bash, -c, official Homebrew installation script, official installation instructions

2.2.2 Running the installation

This section walks the reader through running the Homebrew installer and interpreting its password prompt and progress messages.

Key terms: installation command, Mac login password, sudo, temporary elevated permission, ==>, progress

2.2.3 Post-installation setup

This section explains why Homebrew needs post-installation PATH setup and how the installer’s commands make it available now and in future terminal windows.

Key terms: Homebrew, PATH, shell, installer output, .zprofile, terminal window

2.3 Verifying the installation

This section shows how to verify a Homebrew installation using its version output and diagnostic check.

Key terms: Homebrew, version number, brew doctor, Your system is ready to brew, warnings, PATH

2.4 Installing your first package: Wget

Introduces wget as a terminal tool for downloading files and identifies it as the package used to test Homebrew.

Key terms: wget, terminal

2.4.1 Installing wget

This subsection shows that Homebrew installs wget with one command and then prompts the reader to verify that wget works.

Key terms: Homebrew, wget, dependencies

2.4.2 Trying out wget

This subsection has the reader use wget to download a file into a project folder and confirm that the file appears there.

Key terms: wget, project folder, index.html, terminal

2.5 Key Homebrew commands

2.5.1 Installing a package

2.5.2 Searching for a package

2.5.3 Listing installed packages

2.5.4 Getting package information

This section explains that Homebrew’s package information output shows package details and lists any dependencies.

Key terms: brew info, Dependencies

2.5.5 Updating Homebrew

2.5.6 Upgrading installed packages

2.5.7 Uninstalling a package

2.5.8 Checking for problems

2.6 How Homebrew organizes files

This section explains where Homebrew keeps packages on a Mac and how its directory layout makes installed commands available in the terminal.

Key terms: Cellar/, bin/, symbolic links, wget, Apple Silicon, /opt/homebrew/, /opt, Intel Macs, /usr/local/

2.7 Exercises

2.8 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 1: Getting started with local AI Chapter 3: Installing and setting up Ollama →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.