Nicholas Adamou
Nicholas Adamou

Reputation: 741

How do I fix Homebrew "Error: 'en_US' cannot be parsed to a Locale"?

Every time I run brew or brew cask on my Mac, I get hit with the following error:

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>'

Results after running 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"

Upvotes: 1

Views: 48

Answers (1)

Nicholas Adamou
Nicholas Adamou

Reputation: 741

I learned through a little bit more research through this issue, that simply executing the command: brew update-reset && brew update, solves the issue by resetting brew.

Upvotes: 1

Related Questions