Homebrew / brew

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

Brew Doctor Error - Calling keg_only :provided_by_osx is disabled! #4093

Closed brianjking closed 6 years ago

brianjking 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:

HOMEBREW_VERSION: 1.6.1-28-g1d9746d
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 1d9746db84d63acd4fd7c2b9b28569892d9a0d9f
Last commit: 4 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: fe1bd75adc301de3277ad15e9fda5590c5323f8f
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.17.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_40, 1.6.0_65-b14-468
macOS: 10.12.6-x86_64
CLT: 9.2.0.0.1.1510905681
Xcode: 9.2
XQuartz: 2.7.11 => /opt/X11

Thank you!

MikeMcQuaid commented 6 years ago

Run brew doctor --debug and brew tap and paste their output here.

brianjking commented 6 years ago

@MikeMcQuaid

brew doctor --debug

Checking check_access_cache
Checking check_access_cellar
Checking check_access_homebrew_repository
Checking check_access_lock_dir
Checking check_access_logs
Checking check_access_prefix_directories
Checking check_access_site_packages
Checking check_brew_git_origin
Checking check_build_from_source
Checking check_clt_minimum_version
Checking check_clt_up_to_date
Checking check_coretap_git_origin
Checking check_dyld_vars
Checking check_filesystem_case_sensitive
Checking check_for_anaconda
Checking check_for_bad_curl
Checking check_for_bad_python_symlink
Checking check_for_beta_xquartz
Checking check_for_config_scripts
Checking check_for_external_cmd_name_conflict
Checking check_for_gettext
Checking check_for_git
Checking check_for_iconv
Checking check_for_installed_developer_tools
Checking check_for_multiple_volumes
Checking check_for_non_prefixed_coreutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb
Checking check_for_non_prefixed_findutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb
Checking check_for_other_frameworks
Checking check_for_other_package_managers
Checking check_for_pydistutils_cfg_in_home
Checking check_for_stray_dylibs
Checking check_for_stray_headers
Checking check_for_stray_las
Checking check_for_stray_pcs
Checking check_for_stray_static_libs
Checking check_for_symlinked_cellar
Checking check_for_tap_ruby_files_locations
Checking check_for_unlinked_but_not_keg_only
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/ab.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/opt/ab/.brew/ab.rb
Error: Calling keg_only :provided_by_osx is disabled!
Use keg_only :provided_by_macos instead.
/usr/local/Homebrew/Library/Homebrew/formula.rb:1015:in `keg_only?'
Or, even better, submit a PR to fix it!

& brew tap output is below:

brew tap                                                                                                                                         
bradp/vv
caskroom/cask
caskroom/fonts
cloudfoundry/tap
dart-lang/dart
homebrew/apache
homebrew/bundle
homebrew/core
homebrew/dupes
homebrew/gui
homebrew/php
homebrew/services
homebrew/versions
homebrew/x11
linode/cli
neovim/neovim
osx-cross/avr
rogual/neovim-dot-app
tomanthony/brews
youtux/livecheck
zyedidia/micro
MikeMcQuaid commented 6 years ago

@brianjking You need to run brew untap on: homebrew/apache homebrew/dupes homebrew/gui homebrew/php homebrew/versions homebrew/x11

In this case the issue is that your homebrew/apache tap has been set to an old revision.

brianjking commented 6 years ago

@MikeMcQuaid Still having the same error in brew doctor showing even after running brew untap on the taps you specified. Any additional steps to take?

Thanks!

MikeMcQuaid commented 6 years ago

@brianjking brew update-reset may fix it.

brianjking commented 6 years ago

@MikeMcQuaid Ran brew update-reset successfully. Followed it by multiple brew update and then brew upgrade, still seeing same error with brew doctor.

Here's the output of brew doctor --debug again...

brew doctor --debug                                                                                                                           13:50   19.04.18
Checking check_access_cache
Checking check_access_cellar
Checking check_access_homebrew_repository
Checking check_access_lock_dir
Checking check_access_logs
Checking check_access_prefix_directories
Checking check_access_site_packages
Checking check_brew_git_origin
Checking check_build_from_source
Checking check_clt_minimum_version
Checking check_clt_up_to_date
Checking check_coretap_git_origin
Checking check_dyld_vars
Checking check_filesystem_case_sensitive
Checking check_for_anaconda
Checking check_for_bad_curl
Checking check_for_bad_python_symlink
Checking check_for_beta_xquartz
Checking check_for_config_scripts
Checking check_for_external_cmd_name_conflict
Checking check_for_gettext
Checking check_for_git
Checking check_for_iconv
Checking check_for_installed_developer_tools
Checking check_for_multiple_volumes
Checking check_for_non_prefixed_coreutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb
Checking check_for_non_prefixed_findutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb
Checking check_for_other_frameworks
Checking check_for_other_package_managers
Checking check_for_pydistutils_cfg_in_home
Checking check_for_stray_dylibs
Checking check_for_stray_headers
Checking check_for_stray_las
Checking check_for_stray_pcs
Checking check_for_stray_static_libs
Checking check_for_symlinked_cellar
Checking check_for_tap_ruby_files_locations
Checking check_for_unlinked_but_not_keg_only
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/Formula/ab.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/opt/ab/.brew/ab.rb
Error: Calling keg_only :provided_by_osx is disabled!
Use keg_only :provided_by_macos instead.
/usr/local/Homebrew/Library/Homebrew/formula.rb:1015:in `keg_only?'
Or, even better, submit a PR to fix it!

& brew tap

bradp/vv
caskroom/cask
caskroom/fonts
cloudfoundry/tap
dart-lang/dart
homebrew/bundle
homebrew/core
homebrew/services
linode/cli
neovim/neovim
osx-cross/avr
rogual/neovim-dot-app
tomanthony/brews
youtux/livecheck
zyedidia/micro
MikeMcQuaid commented 6 years ago

/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/Formula/ab.rb

Can you paste the output of ls -lha /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/Formula/ab.rb?

brianjking commented 6 years ago

@MikeMcQuaid

ls -lha /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/Formula/ab.rb                                                              
ls: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-apache/Formula/ab.rb: No such file or directory
MikeMcQuaid commented 6 years ago

@brianjking Odd. brew uninstall --force ab may be necessary but note if you're using that formula it's no longer provided by any official tap (but is part of the httpd formula).

ilovezfs commented 6 years ago

macOS provides ab.

brianjking commented 6 years ago

@MikeMcQuaid Thank you! Finally back up and running...