Error message when starting vim: “Failed to set locale category LC_NUMERIC to en_CH” (or en_BR, en_RU & LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES)

First, access your .bash_profile file by typing the following (using vim as text editor):

vim ~/.bash_profile

Inside the file .bash_profile, insert the following line:

export LC_ALL=en_US.UTF-8

Note, however, that newer versions of macOS ship with zsh instead of bash as the default shell. If this is the case with your Mac, you will have to edit ~/.zshrc instead of ~/.bash_profile.

Restart the Terminal or source ~/.zshrc or source ~/.bash_profile and launch vim again: the error message should have disappeared.

Thanks @geoyws – George Yong and pkropachev
Pavel Kropachev for their answer found there, thanks @bk2204 for the hints in the other answer

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)