Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew link fails intermittently on MacOS Sonoma #17224

Open
3 tasks done
charltonaustin opened this issue May 3, 2024 · 6 comments
Open
3 tasks done

Brew link fails intermittently on MacOS Sonoma #17224

charltonaustin opened this issue May 3, 2024 · 6 comments
Labels
bug Reproducible Homebrew/brew bug

Comments

@charltonaustin
Copy link

brew doctor output

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: 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:
  gdk-pixbuf
  harfbuzz

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce 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.

brew config output

HOMEBREW_VERSION: 4.2.20
ORIGIN: https://github.com/Homebrew/brew
HEAD: c2ed3327c605c3e738359c9807b8f4cd6fec09eb
Last commit: 5 days ago
Core tap JSON: 03 May 19:44 UTC
Core cask tap JSON: 03 May 19:44 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.2.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

I was trying to install a package so I could use it when the linking of a dependency failed. This has happened on multiple packages.

What happened (include all command output)?

I ran the command brew link librsvg multiple times without making any changes and got different outputs.

[73ms]$ brew install graphviz
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/manifests/11.0.0
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching dependencies for graphviz: libavif, gd, jasper, netpbm, gts, gdk-pixbuf, fribidi, graphite2, harfbuzz, pango and librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.4
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/be5adfc796abe915819451a1488fc3b9f68d320a8bb92c451c21f450b4e4e672--libavif-1.0.4.bottle_manifest.json
==> Fetching libavif
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/blobs/sha256:9008bf76467537b799707b9f01c1129e64619787f8c198b0ce530f3656479b4b
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/7541d32b76ab55aa19cabd3d24e617263169edefcc746c6a7127f48f072ffedd--libavif--1.0.4.arm64_sonoma.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_6
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/1f63d9efd8c74faa4477bd8b8a3970abd38e51230ed052918bb6f3715aab8b61--gd-2.3.3_6.bottle_manifest.json
==> Fetching gd
==> Downloading https://ghcr.io/v2/homebrew/core/gd/blobs/sha256:e278f6f79e6ac00c5f0f14bc8980197c89426eab2ba90d8fc1e82da777fb8378
Already downloaded: /Users/<user_names>/Library/Caches/Homebrew/downloads/88ca65879b60859cad419826b27ee4ce0a511ebe3483c79bf4ff4dbbe9b86bb9--gd--2.3.3_6.arm64_sonoma.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/manifests/4.2.4
Already downloaded: /Users/<user_names>/Library/Caches/Homebrew/downloads/0edc7047fdbd9e0fd88f4c5ceed204b57e9b4d4f42c1b1b21c502d68fce31118--jasper-4.2.4.bottle_manifest.json
==> Fetching jasper
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/blobs/sha256:a9c32c908bdf797743a22d851efd4c28b6abf6ad132bcececfb83de354383f72
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/47f74d5bbb161e2a1f9ce3ae55de47d4a350c267edb59f426f5646b0f6635b81--jasper--4.2.4.arm64_sonoma.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/manifests/11.02.09
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching netpbm
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/blobs/sha256:a69bee1c788f8d179de7894db0080b7b1905398ef1f546c1469ca9c110455f69
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gts/manifests/0.7.6_3
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching gts
==> Downloading https://ghcr.io/v2/homebrew/core/gts/blobs/sha256:45ce1fc7fc4da58e808c6d11bd19a17c35bed97719b63e2572b22ff6bd417aac
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/manifests/2.42.11-1
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching gdk-pixbuf
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/blobs/sha256:5a18df52c38f2483e8d361e19ae4f715bdb356ea6153c3893d5ec649e1b059e7
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/manifests/1.0.14
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching fribidi
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/blobs/sha256:5aea13f26a125562f2564cfc3c4051bd3bd6c65780b8349f5bbca3afbc3f2bf5
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/graphite2/manifests/1.3.14
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching graphite2
==> Downloading https://ghcr.io/v2/homebrew/core/graphite2/blobs/sha256:4cdee055db9958e12662c53661fab627057d3553974d15b289e2955b439f4a9d
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/8.4.0
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching harfbuzz
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/blobs/sha256:b74301ad74f8d0647b49ed72156895d0c598d7cf206d331d79aeab415eb72e8e
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.52.2
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching pango
==> Downloading https://ghcr.io/v2/homebrew/core/pango/blobs/sha256:d7310d07a8e4de1846e72e1965012b706df6b6b68b7d7044d0b626927dd0dbda
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.58.0
######################################################################################################################################################################################################################################################### 100.0%
==> Fetching librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/blobs/sha256:102ea16956bbe698c8503838b3d2b01342b68c564e2e6bd8617c52e1abe274a9
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Fetching graphviz
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:29eb1e32e80a89d08d97932fcd82105deae9ef6d84d22811b5e9190417600deb
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                              ######################################################################################################################################################################################################################################################### 100.0%
==> Installing dependencies for graphviz: libavif, gd, jasper, netpbm, gts, gdk-pixbuf, fribidi, graphite2, harfbuzz, pango and librsvg
==> Installing graphviz dependency: libavif
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.4
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/be5adfc796abe915819451a1488fc3b9f68d320a8bb92c451c21f450b4e4e672--libavif-1.0.4.bottle_manifest.json
==> Pouring libavif--1.0.4.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libavif/1.0.4: 19 files, 538KB
==> Installing graphviz dependency: gd
==> Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_6
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/1f63d9efd8c74faa4477bd8b8a3970abd38e51230ed052918bb6f3715aab8b61--gd-2.3.3_6.bottle_manifest.json
==> Pouring gd--2.3.3_6.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gd/2.3.3_6: 33 files, 1.5MB
==> Installing graphviz dependency: jasper
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/manifests/4.2.4
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/0edc7047fdbd9e0fd88f4c5ceed204b57e9b4d4f42c1b1b21c502d68fce31118--jasper-4.2.4.bottle_manifest.json
==> Pouring jasper--4.2.4.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/jasper/4.2.4: 44 files, 1.6MB
==> Installing graphviz dependency: netpbm
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/manifests/11.02.09
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/1c4be61c6a2db4fdbc7e0252e62cd50fb8296d87a1cc919668ac3c70c6ff7e7f--netpbm-11.02.09.bottle_manifest.json
==> Pouring netpbm--11.02.09.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/netpbm/11.02.09: 416 files, 18.7MB
==> Installing graphviz dependency: gts
==> Downloading https://ghcr.io/v2/homebrew/core/gts/manifests/0.7.6_3
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/0cb7519523b42ff855917c33218c1ef771e3060080fea895de59eb848c833cd1--gts-0.7.6_3.bottle_manifest.json
==> Pouring gts--0.7.6_3.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gts/0.7.6_3: 26 files, 1.6MB
==> Installing graphviz dependency: gdk-pixbuf
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/manifests/2.42.11-1
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/e33b7eccf9c79f017289001438f9402b37bc235e3dc91458dd57345ad2ed1098--gdk-pixbuf-2.42.11-1.bottle_manifest.json
==> Pouring gdk-pixbuf--2.42.11.arm64_sonoma.bottle.1.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Read-only file system @ dir_s_mkdir - /Cellar

You can try again using:
  brew link gdk-pixbuf
==> /opt/homebrew/Cellar/gdk-pixbuf/2.42.11/bin/gdk-pixbuf-query-loaders --update-cache
==> Summary
🍺  /opt/homebrew/Cellar/gdk-pixbuf/2.42.11: 151 files, 4.0MB
==> Installing graphviz dependency: fribidi
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/manifests/1.0.14
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/e6b501ebd099a81598298a9fe97eac544af056e9b6031dabf29d953431e229c1--fribidi-1.0.14.bottle_manifest.json
==> Pouring fribidi--1.0.14.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/fribidi/1.0.14: 67 files, 730.4KB
==> Installing graphviz dependency: graphite2
==> Downloading https://ghcr.io/v2/homebrew/core/graphite2/manifests/1.3.14
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/bbb4dd2ef1846301d1eb08053e19e11ca9c780f93f4d3b2d638fd94a9bf54a0c--graphite2-1.3.14.bottle_manifest.json
==> Pouring graphite2--1.3.14.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/graphite2/1.3.14: 18 files, 281.9KB
==> Installing graphviz dependency: harfbuzz
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/8.4.0
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/fd47e37d9f5b5084316ec51955470aa32e038246275985aee10b1881a4f7344b--harfbuzz-8.4.0.bottle_manifest.json
==> Pouring harfbuzz--8.4.0.arm64_sonoma.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Read-only file system @ dir_s_mkdir - /Cellar

You can try again using:
  brew link harfbuzz
==> Summary
🍺  /opt/homebrew/Cellar/harfbuzz/8.4.0: 76 files, 9.5MB
==> Installing graphviz dependency: pango
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.52.2
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/214b7cb46e8e1680ea60d3578939e548b2daf2721164a11efeda086b9d494949--pango-1.52.2.bottle_manifest.json
==> Pouring pango--1.52.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pango/1.52.2: 68 files, 3.4MB
==> Installing graphviz dependency: librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.58.0
Already downloaded: /Users/<user_name>/Library/Caches/Homebrew/downloads/7b1ad23688052396ca6401b20573b2f69fafc28221b623268521dc99ef161ea7--librsvg-2.58.0.bottle_manifest.json
==> Pouring librsvg--2.58.0.arm64_sonoma.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Read-only file system @ dir_s_mkdir - /Cellar

You can try again using:
  brew link librsvg
==> /opt/homebrew/opt/gdk-pixbuf/bin/gdk-pixbuf-query-loaders --update-cache
==> Summary
🍺  /opt/homebrew/Cellar/librsvg/2.58.0: 22 files, 46.5MB
==> Installing graphviz
==> Pouring graphviz--11.0.0.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/graphviz/11.0.0: 282 files, 7.1MB
==> Running `brew cleanup graphviz`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

[38.202s]$ 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: 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:
  gdk-pixbuf
  harfbuzz
  librsvg
[2.818s]$ brew link librsvg
Linking /opt/homebrew/Cellar/librsvg/2.58.0... 
Error: Read-only file system @ dir_s_mkdir - /Cellar
[1.638s]$ brew link librsvg
Linking /opt/homebrew/Cellar/librsvg/2.58.0... 
Error: Read-only file system @ dir_s_mkdir - /Cellar
[1.235s]$ brew link librsvg
Linking /opt/homebrew/Cellar/librsvg/2.58.0... 12 symlinks created.

What did you expect to happen?

I would expect it to consistently fail or to consistently pass.

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

`brew install <package with failed linking>`
run `brew link <failed linking package>` until it works
@charltonaustin charltonaustin added the bug Reproducible Homebrew/brew bug label May 3, 2024
@MikeMcQuaid
Copy link
Member

Read-only file system @ dir_s_mkdir - /Cellar

This is not an error I've ever seen before. What's the output of mount? Do you have Homebrew on a network drive or anything?

@carlocab
Copy link
Member

carlocab commented May 6, 2024

The output of brew link --verbose --debug might also be helpful for a failed and successful attempt (from the same formula)

@charltonaustin
Copy link
Author

Read-only file system @ dir_s_mkdir - /Cellar

This is not an error I've ever seen before. What's the output of mount? Do you have Homebrew on a network drive or anything?

I don't have Homebrew on a network drive. Also I wasn't having any problems like this before I upgraded to Sonoma.

@EricFromCanada
Copy link
Member

Do you have macOS running in a virtual machine?

@charltonaustin
Copy link
Author

charltonaustin commented May 8, 2024 via email

@carlocab
Copy link
Member

carlocab commented May 8, 2024

We'll need the output of brew link --debug --verbose for a failing and a successful run to get anywhere here, I think.

Is your machine managed by an MDM (e.g. Jamf, Kandji)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug
Projects
None yet
Development

No branches or pull requests

4 participants