Closed josharian closed 4 years ago
This is a problem with one of the taps you have: https://github.com/riscv/homebrew-riscv
You can perhaps try brew untap riscv/riscv
.
Thanks. I did that, and am now getting other brew/riscv errors in brew doctor, despite untapping.
$ brew untap riscv/riscv
Untapping riscv/riscv...
Untapped 4 formulae (236 files, 137.4KB).
$ brew doctor
Error: invalid attribute for formula 'riscv-pk': version (nil)
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/formula.rb:261:in `validate_attributes!'
/usr/local/Homebrew/Library/Homebrew/formula.rb:208:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:122:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:122:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:331:in `factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:377:in `rescue in from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:373:in `from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:350:in `from_rack'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:714:in `block in check_for_unreadable_installed_formula'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:713:in `each'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:713:in `check_for_unreadable_installed_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:61:in `block in doctor'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:53:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:53:in `doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:103:in `<main>'
I still see riscv things:
$ brew list | grep riscv
riscv-fesvr
riscv-isa-sim
riscv-pk
riscv-tools
But uninstalling them fails:
$ brew uninstall riscv-pk
Error: invalid attribute for formula 'riscv-pk': version (nil)
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/formula.rb:261:in `validate_attributes!'
/usr/local/Homebrew/Library/Homebrew/formula.rb:208:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:122:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:122:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:331:in `factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:377:in `rescue in from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:373:in `from_keg'
/usr/local/Homebrew/Library/Homebrew/keg.rb:421:in `to_formula'
/usr/local/Homebrew/Library/Homebrew/keg.rb:135:in `block in find_some_installed_dependents'
/usr/local/Homebrew/Library/Homebrew/keg.rb:132:in `each'
/usr/local/Homebrew/Library/Homebrew/keg.rb:132:in `group_by'
/usr/local/Homebrew/Library/Homebrew/keg.rb:132:in `find_some_installed_dependents'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:112:in `check_for_dependents'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:105:in `handle_unsatisfied_dependents'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:44:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/brew.rb:103:in `<main>'
Hmm, looks like you can't even uninstall broken formulae since it still validates the formula file on uninstall. It might be worth raising an issue in Homebrew/brew as ideally you won't have to uninstall such formulae manually.
brew uninstall --ignore-dependencies
helps get a little further, but you still get an error as ultimately you can't run Keg.unlink
on a formula which fails to pass validation.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?it didn't work
brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I ran
brew upgrade cmake
, and saw a line telling me to report a bug, so I did.What happened (include command output)
Command output
What you expected to happen
cmake upgraded.
Step-by-step reproduction instructions (by running
brew install
commands)Run brew doctor (see brew doctor output above).