Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.41k stars 9.74k forks source link

brew update throws error "No such file or directory @ realpath_rec" #4786

Closed javian closed 6 years ago

javian commented 6 years ago

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

To help us debug your issue please explain:

After running brew update today I started getting an error about an old bottle from the retired php tap.

# brew update
Updated Homebrew from 6e31c662f to d8dc1f7fe.
Updated 3 taps (homebrew/core, homebrew/cask, homebrew/bundle).
➜  ~ brew update --debug
<snipped everything in between>
==> Migrating cache entries...
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/wget.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/automake.rb
Error: No such file or directory @ realpath_rec - /usr/local/Homebrew/php71-v8js-2.1.0.high_sierra.bottle.tar.gz
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `realpath'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `realpath'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:358:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:358:in `loader_for'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:275:in `factory'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1467:in `[]'
/usr/local/Homebrew/Library/Homebrew/update_migrator.rb:97:in `block in migrate_cache_entries_to_symlinks'
/usr/local/Homebrew/Library/Homebrew/update_migrator.rb:113:in `map'
/usr/local/Homebrew/Library/Homebrew/update_migrator.rb:113:in `migrate_cache_entries_to_symlinks'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:116:in `update_report'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
+ return 1
+ exit 1
➜  ~ brew config
HOMEBREW_VERSION: 1.7.2-94-gd8dc1f7
ORIGIN: https://github.com/Homebrew/brew
HEAD: d8dc1f7fe076c8f92d8f15c700de4230435ac3f6
Last commit: 3 hours ago
Core tap ORIGIN: git@github.com:Homebrew/homebrew-core.git
Core tap HEAD: 487e16ba1521de9cc16711a901c8bd3820f8efd0
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_INSECURE_REDIRECT: 1
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 9.1 build 902
Git: 2.15.2 => /usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11
➜  ~
➜  ~ 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: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/python3.6m/greenlet/greenlet.h

I've also ran brew cleanup but the error still occurs.

reitermarkus commented 6 years ago

What's the output of ls -al $(brew --cache)?