Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

Error: no implicit conversion of nil into Array #82315

Closed KKSun closed 4 years ago

KKSun commented 4 years ago

General troubleshooting steps

Description of issue

brew uninstall report error, like this

> $ brew uninstall telnet                                                                                                      
Uninstalling /usr/local/Cellar/telnet/63... (4 files, 138.1KB)
Error: no implicit conversion of nil into Array
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:95:in `-'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:95:in `block (3 levels) in uninstall'
/usr/local/Homebrew/Library/Homebrew/keg.rb:362:in `block in lock'
/usr/local/Homebrew/Library/Homebrew/lock_file.rb:31:in `with_lock'
/usr/local/Homebrew/Library/Homebrew/keg.rb:358:in `lock'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:71:in `block (2 levels) in uninstall'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:60:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:60:in `block in uninstall'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:46:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:46:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'

Command that failed

brew uninstall <the softeware want to be deleted>

Output of command with --force --verbose --debug

// command can execute, but with Error msg

Output of brew cask doctor

==> Homebrew Version
2.2.15-47-g270fd42
==> macOS
10.15.4
==> SIP
Disabled
==> Java
11.0.7, 10, 1.8.0_162
==> xattr issues
<NONE>
==> Gatekeeper support
Error: Unknown support status
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3533 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (151 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (924 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.39.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/zsh"

Output of brew tap

beeftornado/rmtree
homebrew/cask
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
homebrew/services
vitorgalvao commented 4 years ago
  1. Please don’t ignore the template, and give all the requested information. You ignored the most useful command, the one that shows verbose output.
  2. Use x in checklists (no spaces inside the brackets) and Github will make them clickable.
  3. You’re in the wrong repo. Your command does not start with brew cask so you want https://github.com/Homebrew/homebrew-core.