brew update fails at PHP7.4 step

830 Views Asked by At

Looking for help with a failing brew upgrade.

I'm running macOS Monterey version 12.4 on a MacStudio system. I've been running homebrew applications (notably php7.4) for a good while now. I noticed that it reported that 30 packages could be updated, so I ran:

    brew update
    brew upgrade

The upgrade step failed with (excerpts from log shown here):

Warning: [email protected] has been deprecated because it is a versioned formula!
Warning: Building httpd from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://dlcdn.apache.org/httpd/httpd-2.4.54.tar.bz2
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/0630b06c782baa4fd4809e1322ebb1439d78dfa0cde375669da966f5da5718cd--httpd-2.4.54.tar.bz2
==> Installing [email protected] dependency: httpd
==> ./configure --enable-layout=Slackware-FHS --prefix=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54 --sbindir=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/bin --mandir=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/share/man --sysconfdir=/Volumes/Satechi.SSD.M2/homebrew/etc/httpd --datadir=/Volum
==> make
==> make install
    Error: An exception occurred within a child process:
      Utils::Inreplace::Error: inreplace failed
    /Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/lib/httpd/build/config_vars.mk:
      expected replacement of #<Pathname:/Volumes/Satechi.SSD.M2/homebrew/Cellar/pcre2/10.40> with #<Pathname:/Volumes/Satechi.SSD.M2/homebrew/opt/pcre2>

The things I notice here that might be related to the problem, are the fact a specific version of PHP (7.4) was installed (I must keep this version)... and a vague mention of my unusual path.

Since it may be related: before I installed brew, ran these commands in an effort to minimize the use of the precious .5TB primary drive:

    mkdir /Volumes/Satechi.SSD.M2/homebrew/
    ln -fs /Volumes/Satechi.SSD.M2/homebrew/ /opt/homebrew
    ln -fs /Volumes/Satechi.SSD.M2/homebrew /homebrew # (I no longer remember why I created this link - except that it was to solve some forgotten problem)

So my brew home is technically not in the same filesystem as opt, but the default path to brew's folders (/opt/homebrew/*) continues to work. This is what I want, and it's been working for a few months. Not sure this is related to the problem but I thought I'd point it out in case.

The full output of brew upgrade is:

dennis@macstudio:/opt/homebrew   07/05 07:49:56
> brew update
Already up-to-date.
dennis@macstudio:/opt/homebrew   07/05 07:50:02
> brew upgrade
==> Upgrading 30 outdated packages:
libtiff 4.3.0 -> 4.4.0
ffmpeg 5.0.1 -> 5.0.1_3
nettle 3.7.3 -> 3.8
freetype 2.12.0 -> 2.12.1
openjpeg 2.4.0 -> 2.5.0
speex 1.2.0 -> 1.2.1
harfbuzz 4.2.1 -> 4.3.0
glib 2.72.1 -> 2.72.2
libxcb 1.14_2 -> 1.15
aom 3.3.0 -> 3.4.0
srt 1.4.4 -> 1.5.0
unixodbc 2.3.9_1 -> 2.3.11
ninja 1.10.2_1 -> 1.11.0
meson 0.62.1 -> 0.63.0
curl 7.83.0 -> 7.84.0
[email protected] 7.4.29 -> 7.4.30
krb5 1.19.3 -> 1.20
libvpx 1.11.0 -> 1.12.0
freetds 1.3.10 -> 1.3.12
dav1d 0.9.2 -> 1.0.0
libpq 14.2 -> 14.4
oniguruma 6.9.7.1 -> 6.9.8
x264 r3060 -> r3095
unbound 1.15.0 -> 1.16.0
libzip 1.8.0_1 -> 1.9.2
openldap 2.6.1 -> 2.6.2
libass 0.15.2 -> 0.16.0
libx11 1.7.5 -> 1.8.1
[email protected] 3.9.12 -> 3.9.13_1
gnutls 3.7.4 -> 3.7.6
Warning: Building openldap from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/195208ba31cadc265ea97bb8aad4e78caab1200daf4d855e6c839b5f987f92db--configure-big_sur.diff
==> Downloading https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.2.tgz
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/9e06aa4612038dd6b4686ef4e738b0853be6cca0bcd7b673c7f8d436c4731162--openldap-2.6.2.tgz
==> Downloading https://ghcr.io/v2/homebrew/core/curl/manifests/7.84.0
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/a65075db232ffcd42c8fbf1258bbd0fc1a8b6affe5f8b4eba2a880127e336f48--curl-7.84.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:00b2bfb12b8fd68992872941d19f8c38971cfb7f6c34fe72ebb014b8110ebc07
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/12b262a44d04f8246b961c8b41690618bde0c3e912025ae860b5cca763160812--curl--7.84.0.arm64_monterey.bottle.tar.gz
Warning: Building unixodbc from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading http://www.unixodbc.org/unixODBC-2.3.11.tar.gz
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/01fd783738abfafd6c8cec4df80068e73cf5ff4aea30c8e2c71767de6678f8e4--unixODBC-2.3.11.tar.gz
Warning: Building freetds from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/195208ba31cadc265ea97bb8aad4e78caab1200daf4d855e6c839b5f987f92db--configure-big_sur.diff
==> Downloading https://www.freetds.org/files/stable/freetds-1.3.12.tar.bz2
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/c17aff1bdcced723dd942325b7e7e96b7c1e70b5dc7e889514036b2b9821272d--freetds-1.3.12.tar.bz2
==> Downloading https://ghcr.io/v2/homebrew/core/freetype/manifests/2.12.1
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/908428437764929aa268ec3967d2d4c58d2c0cdcb971555c98cd45ab6b7e3368--freetype-2.12.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/freetype/blobs/sha256:3e190f2fa02702aa86e46cf33e7dde1d93e879f1de38f3d1b61e301f8367136d
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/047bc186da41bb1af4be21bed67fd89fc1402bc8e893c48fcc39633181777ffe--freetype--2.12.1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/libtiff/manifests/4.4.0
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/b37cf6c170f1c01d5757e2494de5d65c9b117306a86f9e29f28e57b1a9972191--libtiff-4.4.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libtiff/blobs/sha256:d2dfbad3fe68e070d0937c71b4de6ca110dda32599a2adfc2272f31064ae8652
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/a26e660ed5b116421a6dbb7550c38769a2c1ee3619e4e05202768cc1d729446e--libtiff--4.4.0.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.4.0
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/960cdcf340a08fc2ed5f16d2cbf7d2d3f5dc110b4df0df159926aca746a43dc6--aom-3.4.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/aom/blobs/sha256:f16849b3bb161a0695d5bb6677799f4d87e1db60fbaf6719f1ea0a996847d029
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/43a851ccf4d3e7785b9d60744a279305b22b7c9a3102cd4554c1ad7220f81df1--aom--3.4.0.arm64_monterey.bottle.tar.gz
Warning: Building krb5 from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://kerberos.org/dist/krb5/1.20/krb5-1.20.tar.gz
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/6e2ebcecfb4893ac77e1724a4492e77dc53193c679df6fa9f44f0641aa0e185f--krb5-1.20.tar.gz
Warning: Building libpq from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://ftp.postgresql.org/pub/source/v14.4/postgresql-14.4.tar.bz2
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/5fc4b1e478c7edc04305eadc9285da556aeac65cc3987ea8651fc0f00468f95e--postgresql-14.4.tar.bz2
==> Downloading https://ghcr.io/v2/homebrew/core/libzip/manifests/1.9.2
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/cb899c2a5c3111ed02fd5b8b5130aa6b6f66f2bf4ad5f2f15bd8537ea3c09ed2--libzip-1.9.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libzip/blobs/sha256:e27a1b53f6b09e0bb04071f66d878ef4594dbc3fde6e27a0b644d33a8ce34e0a
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/7c926e61bd610fa04fdd139f61f1b17f482485581586e0f685a3a3482192da12--libzip--1.9.2.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/oniguruma/manifests/6.9.8
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/fccf013b32eda50ffdfbb2748b9f01c7d5a845d5ba02bfeed201b6a30028800c--oniguruma-6.9.8.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/oniguruma/blobs/sha256:6c66f5d4198bfd9d9be019f4f40d19f4c68676df9eb0702f450ec818ef43d3e9
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/7d6a5f7cd1a97384adefddfb9d93988a5483cba45514e16df22b6022d7bf4f13--oniguruma--6.9.8.arm64_monterey.bottle.tar.gz
Warning: [email protected] has been deprecated because it is a versioned formula!
Warning: Building httpd from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/Satechi.SSD.M2/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/Satechi.SSD.M2/homebrew)
==> Downloading https://dlcdn.apache.org/httpd/httpd-2.4.54.tar.bz2
Already downloaded: /Users/dennis/Library/Caches/Homebrew/downloads/0630b06c782baa4fd4809e1322ebb1439d78dfa0cde375669da966f5da5718cd--httpd-2.4.54.tar.bz2
==> Installing [email protected] dependency: httpd
==> ./configure --enable-layout=Slackware-FHS --prefix=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54 --sbindir=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/bin --mandir=/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/share/man --sysconfdir=/Volumes/Satechi.SSD.M2/homebrew/etc/httpd --datadir=/Volum
==> make
==> make install
Error: An exception occurred within a child process:
  Utils::Inreplace::Error: inreplace failed
/Volumes/Satechi.SSD.M2/homebrew/Cellar/httpd/2.4.54/lib/httpd/build/config_vars.mk:
  expected replacement of #<Pathname:/Volumes/Satechi.SSD.M2/homebrew/Cellar/pcre2/10.40> with #<Pathname:/Volumes/Satechi.SSD.M2/homebrew/opt/pcre2>

I ran "brew doctor" with the following output: (We can ignore the error about brew not being in the path. I had removed it from PATH as a troubleshooting step before this step.)

dennis@macstudio:/opt/homebrew/bin   07/05 07:36:29
> brew doctor
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 installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /homebrew/bin/pkg-config
  /homebrew/bin/freetype-config
  /homebrew/bin/libpng16-config
  /homebrew/bin/libpng-config
  /homebrew/bin/pspell-config
  /homebrew/bin/python3.9-config
  /homebrew/bin/onig-config
  /homebrew/bin/python3-config
  /homebrew/bin/pcre2-config
  /homebrew/bin/pcre-config
  /homebrew/bin/sdl2-config
  /homebrew/bin/guile-config

Warning: Your Cellar and TEMP directories are on different volumes.
macOS won't move relative symlinks across volumes unless the target file already
exists. Brews known to be affected by this are Git and Narwhal.

You should set the "HOMEBREW_TEMP" environment variable to a suitable
directory on the same volume as your Cellar.

Warning: Your Homebrew's prefix is not /opt/homebrew.
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/opt/homebrew).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.


Warning: /usr/bin occurs before /Volumes/Satechi.SSD.M2/homebrew/bin in your PATH.
This means that system-provided programs will be used instead of those
provided by Homebrew. Consider setting your PATH so that
/Volumes/Satechi.SSD.M2/homebrew/bin occurs before /usr/bin. Here is a one-liner:
  echo 'export PATH="/Volumes/Satechi.SSD.M2/homebrew/bin:$PATH"' >> ~/.kshrc

The following tools exist at both paths:
  python3
  pip3
  tidy

Warning: Homebrew's "bin" was not found in your PATH.
Consider setting your PATH for example like so:
  echo 'export PATH="/Volumes/Satechi.SSD.M2/homebrew/bin:$PATH"' >> ~/.kshrc

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /Volumes/Satechi.SSD.M2/homebrew/sbin.
Consider setting your PATH for example like so:
  echo 'export PATH="/Volumes/Satechi.SSD.M2/homebrew/sbin:$PATH"' >> ~/.kshrc

Here is the output of 'brew config':

> brew config
HOMEBREW_VERSION: 3.5.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 88a5fac96752f17280e64f60926f58dff45990e0
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: edf3b15659f8130f2c6f4b8db62bc84c444c095d
Core tap last commit: 8 days ago
Core tap branch: master
HOMEBREW_PREFIX: /Volumes/Satechi.SSD.M2/homebrew
HOMEBREW_REPOSITORY: /Volumes/Satechi.SSD.M2/homebrew
HOMEBREW_CELLAR: /Volumes/Satechi.SSD.M2/homebrew/Cellar
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.32.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.4-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: N/A
Rosetta 2: false

I don't understand enough about brew to begin diagnosing his problem, beyond what I've done here. Any help?

0

There are 0 best solutions below