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