Skip to content

Post-install fails on /usr/local prefixes without libexec: cannot create it #24685

Done
zbeekman/homebrew-tap
#86

Description

@zbeekman

brew doctor output

brew doctor output (unrelated warnings)
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some directories in the Caskroom do not have valid metadata.
The following casks cannot be upgraded as-is:
  /usr/local/Caskroom/taskexplorer
  /usr/local/Caskroom/bettertouchtool

To fix this, run:
  brew reinstall --cask --force taskexplorer
  brew reinstall --cask --force bettertouchtool

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:

  brooklyn
  goldencheetah
  multimc

Warning: Some installed kegs have no formulae!
You should find replacements for the following formulae.

Deleted from homebrew/core:
  azure-cli
  known_hosts

No tap recorded (possibly installed manually):
  (4 private local formulae omitted)

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:

  icu4c@76
  icu4c@78
  python@3.10
  qt@5
  tcl-tk@8

The following formulae are installed as dependencies:

  icu4c@77
  pcre

Warning: Root certificates in /etc/ssl/cert.pem can trust compromised CAs.
Command-line tools using this file may accept forged TLS certificates:
  AAA Certificate Services
  emSign ECC Root CA - G3

Run this script to create a backup and remove these roots:
  sudo /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.10/bin/ruby --disable=gems,rubyopt /usr/local/Homebrew/Library/Homebrew/utils/emudhra_certificates.rb

The script validates the bundle before replacing it. Removing the roots
can break HTTPS connections to some websites.

Run `brew doctor` afterwards and after system updates, which can restore
the roots.
For details and software update plans, see:
  https://support.apple.com/en-us/149555

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built.

Run `brew link` on these:
  balena-cli
  open-mpi
  gcc@13
  gnupg
  universal-ctags

Warning: You are using macOS on Intel x86_64.
We do not provide support for this platform (as-of September 2026, announced August 2025).

Apple have dropped Intel x86_64 support in macOS Golden Gate (27).
GitHub Actions are dropping macOS Intel x86_64 runners in 2027.
Homebrew is a non-profit project run entirely by volunteers, not employees.
If the biggest companies in the world cannot support macOS Intel x86_64
any longer, sadly neither can we.

Homebrew no longer builds bottles for this configuration.
Existing bottles may still work, but updated formulae may build from source.

Warning: Some taps are not on the default git origin branch and may not receive updates.

If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo zbeekman/tap) checkout main

Warning: The following taps are not trusted:
  brewsci/base
  brewsci/num
  browsh-org/browsh
  jesseduffield/lazydocker
  local/octest
  pothosware/pothos
  socsieng/tap

Homebrew is currently ignoring formulae, casks and commands
from these taps because tap trust is required.
Prefer trusting only the specific formulae, casks or commands you need.
Trust installed formulae from these taps with:
  brew trust --formula browsh-org/browsh/browsh
  brew trust --formula socsieng/tap/sendkeys
Trust other specific casks and commands with:
  brew trust --cask <user>/<tap>/<cask>
  brew trust --command <user>/<tap>/<command>
Whole-tap trust is broader and includes all current and future formulae,
casks and commands from the listed taps. Trust whole taps with:
  brew trust brewsci/base brewsci/num browsh-org/browsh jesseduffield/lazydocker local/octest pothosware/pothos socsieng/tap
Untap them with:
  brew untap brewsci/base brewsci/num browsh-org/browsh jesseduffield/lazydocker local/octest pothosware/pothos socsieng/tap
For more information, see:
  https://docs.brew.sh/Tap-Trust

Warning: Your Xcode (26.3) is outdated.
Please update to Xcode 26.6 (or delete it).
Xcode can be updated from the App Store.

Warning: Broken symlinks were found:
  /usr/local/bin/bq
  /usr/local/bin/docker-credential-gcloud
  /usr/local/bin/gcloud
  /usr/local/bin/git-credential-gcloud
  /usr/local/bin/gsutil
  /usr/local/etc/bash_completion.d/google-cloud-sdk
  /usr/local/share/zsh/site-functions/_google_cloud_sdk

Remove them with `brew cleanup`
This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
You can report issues with Tier 3 configurations to Homebrew/* repositories!

Read the above document before opening any issues or PRs.

Verification

  • I ran brew update twice and am still able to reproduce my issue.
  • I have supplied my brew doctor output above and it seems unrelated to my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
  • I did not use AI/LLM to create this issue, or I disclosed the tool and model used; I will answer maintainer questions myself without AI/LLM.

brew config output

brew config output
HOMEBREW_VERSION: 7.0.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3e47189a707c739ee1278a28a3b845f5834574e6
Last commit: 3 hours ago
Branch: main
Core tap HEAD: d1a9d67b00bbe914fae8ce665ddcb75dde08fd6e
Core tap last commit: 3 weeks ago
Core cask tap origin: git@github.com:homebrew/homebrew-cask.git
Core cask tap HEAD: 986ddaba01d9abc7707ef2d044fe1adf1f963d9c
Core cask tap last commit: 4 weeks ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BAT: set
HOMEBREW_CURL_RETRIES: 4
HOMEBREW_DISPLAY_INSTALL_TIMES: set
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_NO_INSECURE_REDIRECT: set
Homebrew Ruby: 4.0.10 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.10/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 17.0.0 build 1700
Git: 2.56.1 => /usr/local/opt/git/bin/git
Curl: 8.23.0 => /usr/local/opt/curl/bin/curl
macOS: 26.7.1-x86_64
CLT: 26.6.0.0.1781586589
Xcode: 26.3

What were you trying to do (and why)?

Follow-up to #24663, which #24667 fixed for brew test-bot --only-cleanup-before. My /usr/local prefix (an older Intel install)
is owned by root and has no libexec. Since 376267b, every
post-install there fails, so formulae such as ca-certificates are
left without their post-install.

What happened (include all command output)?

$ brew postinstall --debug ca-certificates
==> Postinstalling ca-certificates
Warning: The post-install step did not complete successfully
==> Permission denied @ dir_s_mkdir - /usr/local/libexec
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:1553:in 'Pathname#mkpath'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:1553:in 'block (2 levels) in FormulaInstaller#post_install'
/usr/local/Homebrew/Library/Homebrew/sandbox.rb:166:in 'Sandbox.run_or_fork'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:1538:in 'block in FormulaInstaller#post_install'
/usr/local/Homebrew/Library/Homebrew/sandbox.rb:257:in 'Sandbox.with_preserved_brew_file'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:1537:in 'FormulaInstaller#post_install'
/usr/local/Homebrew/Library/Homebrew/cmd/postinstall.rb:28:in 'block in Homebrew::Cmd::Postinstall#run'
/usr/local/Homebrew/Library/Homebrew/cmd/postinstall.rb:20:in 'Array#each'
/usr/local/Homebrew/Library/Homebrew/cmd/postinstall.rb:20:in 'Homebrew::Cmd::Postinstall#run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:147:in '<main>'
You can try again using:
  brew postinstall ca-certificates

Without --debug (or HOMEBREW_DEVELOPER), only the warning is shown,
so users see the post-install fail with no reason given.

376267b ("formula_installer: create prefix libexec ahead of the
sandbox", follow-up to #24622) added
(HOMEBREW_PREFIX/"libexec").mkpath before every sandboxed
post-install. On a root-owned /usr/local without libexec, mkpath
fails and the post-install is skipped.

The same happens on GitHub's macos-15-intel runner: pouring
ca-certificates there fails at the same line
(https://github.com/zbeekman/homebrew-tap/actions/runs/44426214065/job/135231616677,
brew 7.0.14-90-g82575d65f0). It passes on macos-26
(/opt/homebrew) and in the Linux containers.

Homebrew/install#1171 now has install.sh create libexec, but only
for new installs or reruns of the script. Existing /usr/local
installs and the current runner image predate it.

What did you expect to happen?

The post-install runs, as it did before 376267b. For example, brew
could create libexec only when it can, or allow writes to it only
when it exists, as #24667 did for cleanup.

Step-by-step reproduction instructions (running brew commands)

# On a /usr/local prefix owned by root without /usr/local/libexec
# (e.g. an older Intel install, or a GitHub-hosted macos-15-intel
# runner after Homebrew/actions/setup-homebrew):
brew postinstall --debug ca-certificates

AI disclosure: the cause was traced and this issue was drafted with
Claude Code (Opus 5.5, high effort); I reviewed it before posting.

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. added a commit that references this issue on Nov 19, 2026
    a7df2f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions