Linuxbrew / brew

:beer::penguin: The Homebrew package manager for Linux
https://linuxbrew.sh
BSD 2-Clause "Simplified" License
2.66k stars 236 forks source link

Error: undefined method `rebuild' #101

Closed axiac closed 8 years ago

axiac commented 8 years ago

Today, August 26, 2016 I ran brew update followed by brew outdated to see what's new. brew update completed successfully, brew outdated (and other commands that deal with the formulas) fails.

I followed the troubleshooting directions and this is the output:

$ brew update
Already up-to-date.
$ brew update
Already up-to-date.
$ brew doctor
Error: undefined method `rebuild' for #<BottleSpecification:0x0000000246d7a8>
Please report this bug:
    https://github.com/Linuxbrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
/home/axiac/.linuxbrew/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:16:in `block in <class:Php56>'
/home/axiac/.linuxbrew/Library/Homebrew/software_spec.rb:92:in `instance_eval'
/home/axiac/.linuxbrew/Library/Homebrew/software_spec.rb:92:in `bottle'
/home/axiac/.linuxbrew/Library/Homebrew/formula.rb:1791:in `bottle'
/home/axiac/.linuxbrew/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:15:in `<class:Php56>'
/home/axiac/.linuxbrew/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:3:in `load_formula'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:25:in `module_eval'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:25:in `load_formula'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:91:in `load_file'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:82:in `klass'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:78:in `get_formula'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:175:in `get_formula'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:215:in `factory'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:242:in `from_keg'
/home/axiac/.linuxbrew/Library/Homebrew/formulary.rb:225:in `from_rack'
/home/axiac/.linuxbrew/Library/Homebrew/formula.rb:1183:in `block in installed'
/home/axiac/.linuxbrew/Library/Homebrew/formula.rb:1181:in `map'
/home/axiac/.linuxbrew/Library/Homebrew/formula.rb:1181:in `installed'
/home/axiac/.linuxbrew/Library/Homebrew/diagnostic.rb:907:in `check_missing_deps'
/home/axiac/.linuxbrew/Library/Homebrew/cmd/doctor.rb:42:in `block in doctor'
/home/axiac/.linuxbrew/Library/Homebrew/cmd/doctor.rb:34:in `each'
/home/axiac/.linuxbrew/Library/Homebrew/cmd/doctor.rb:34:in `doctor'
/home/axiac/.linuxbrew/Library/Homebrew/brew.rb:87:in `<main>'

brew outdated and other commands produce a (shorter but) similar error dump.

The output of the first brew update is this:

$ brew update
Updated 4 taps (homebrew/core, homebrew/dupes, homebrew/php, homebrew/versions).
==> New Formulae
homebrew/php/php70-gearman            homebrew/php/php71-oauth              homebrew/php/php71-ref                homebrew/php/php71-stats              homebrew/php/php71-timecop            homebrew/versions/go16              
homebrew/php/php70-ref                homebrew/php/php71-pcntl              homebrew/php/php71-snmp               homebrew/php/php71-swoole             homebrew/php/php71-xxtea              homebrew/versions/spidermonkey45    
homebrew/php/php70-solr               homebrew/php/php71-pspell             homebrew/php/php71-solr               homebrew/php/php71-tidy               homebrew/versions/clang-format38      homebrew/versions/srtp15            
==> Updated Formulae
homebrew/dupes/diffutils         homebrew/php/php55-solr          homebrew/php/php56-opcache       homebrew/php/php56-solr          homebrew/php/php70-opcache       homebrew/php/php71 ✔             homebrew/php/phpmyadmin        
homebrew/dupes/lapack            homebrew/php/php55-swoole        homebrew/php/php56-pcntl         homebrew/php/php56-swoole        homebrew/php/php70-pcntl         homebrew/php/php71-gmp           homebrew/versions/glfw3        
homebrew/php/brew-php-switcher   homebrew/php/php55-tidy          homebrew/php/php56-pdo-dblib     homebrew/php/php56-tidy          homebrew/php/php70-pdo-dblib     homebrew/php/php71-intl          homebrew/versions/hdf4         
homebrew/php/php53-solr          homebrew/php/php56 ✔             homebrew/php/php56-pdo-pgsql     homebrew/php/php70 ✔             homebrew/php/php70-pdo-pgsql     homebrew/php/php71-mcrypt        homebrew/versions/node4-lts    
homebrew/php/php53-swoole        homebrew/php/php56-gmp           homebrew/php/php56-pspell        homebrew/php/php70-gmp           homebrew/php/php70-pspell        homebrew/php/php71-opcache       homebrew/versions/postgresql93 
homebrew/php/php54-solr          homebrew/php/php56-intl          homebrew/php/php56-qr            homebrew/php/php70-intl          homebrew/php/php70-snmp          homebrew/php/php71-pdo-dblib   
homebrew/php/php54-swoole        homebrew/php/php56-mcrypt        homebrew/php/php56-snmp          homebrew/php/php70-mcrypt        homebrew/php/php70-tidy          homebrew/php/php71-pdo-pgsql   
==> Renamed Formulae
homebrew/versions/zeromq405 -> homebrew/versions/zeromq40
==> Deleted Formulae
homebrew/versions/valgrind36

The packages php56, php70 and php71 were updated. brew info with argument php56 or php70 fails. brew info php71 succeeds. brew upgrade with any of them as argument fails.

rwhogg commented 8 years ago

rebuild is the new name for a bottle revision per https://github.com/Homebrew/brew/issues/38.

That hasn't been merged into Linuxbrew yet, but I'm working on it. Hopefully the merge should be finished by tonight.

rwhogg commented 8 years ago

I've finished the merge, so rebuild should now be available.

Thanks for submitting the bug report :smile:

Closing this issue, but feel free to reopen it if you still have problems.

axiac commented 8 years ago

It works now.

Thank you.

archonsd commented 7 years ago

Can we tell whether this should (still?) be affecting Mac OSX Sierra brew? The 'fix' above seems to be Linux-specific, but I have a very similar Brew Doctor output:

PasteBin console output of Brew Doctor in MacOSX Sierra

sjackman commented 7 years ago

This issue should not affect Mac OS Sierra. You're most likely using Homebrew for Mac rather than Linuxbrew. You may want to open an issue at https://github.com/Homebrew/brew