每次在Mac上运行brew
或brew cask
时,都会遇到以下错误:
Error: 'en_US' cannot be parsed to a Locale
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/locale.rb:15:in `parse'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/dsl.rb:141:in `map'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/dsl.rb:141:in `language_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/dsl.rb:115:in `language'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/firefox.rb:125:in `block in load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:40:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:40:in `initialize'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:32:in `new'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:32:in `cask'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:76:in `cask'
/usr/local/Homebrew/Library/Homebrew/compat/hbc/cask_loader.rb:15:in `cask'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:122:in `cask'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/firefox.rb:1:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:59:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:59:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:179:in `load'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:108:in `stale_cask?'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:53:in `stale?'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:228:in `block in cleanup_cache'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:215:in `each'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:215:in `cleanup_cache'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:155:in `clean!'
/usr/local/Homebrew/Library/Homebrew/cmd/cleanup.rb:30:in `cleanup'
/usr/local/Homebrew/Library/Homebrew/brew.rb:87:in `<main>'
运行locale
后的结果:
LANG="en_US"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"