Tagged: locale

macOS Sierra Errors and Fixes

Updating to a new OS has always been a pain for any OS. Mac is no different. A couple of days ago, updated the mac OS from OS X El Capitan (10.11) to macOS Sierra (10.12).

screen-shot-2016-10-26-at-6-25-45-pm

Mostly the update seemed okay. However, I did receive a few hiccups after the recent update. Here’s the list of errors that I received and how I solved it. Hope it helps someone else who come across similar error/s.

php config files

Sierra simply takes a backup of the previous /etc/php.ini into /etc/php.ini-previous and doesn’t install the new php.ini by itself. So, make sure you copy the new php.ini.

The same applies to /etc/php-fpm.conf file too.

locale settings – zsh

I use zsh as my primary shell. Not sure what went wrong with the default locale settings. I get somewhat similar error messages related to locale whenever I connect to a CentOS or Debian based servers via SSH.

To fix it, I appended the following line into ~/.zshrc

export LANG="en_US.UTF-8"
export LC_ALL=$LANG

Just for the records, here’s the error message on CentOS 5…

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

Even though, the error message contains the word “bash”, it isn’t related to bash. 😛

ZSH – du – tab completion

Actually, an old issue has been fixed in macOS Sierra. Earlier, there was a bug that doesn’t allow tab completion for the command “du”. Now it works! YES!!! Thanks for whoever fixed it!

I will keep this post updated, if I come across any more errors and possible fixes!

Advertisements

Setlocale warning on a new installation – en_US.UTF-8

Just do the following and ignore the rest of this post…

dpkg-reconfigure locales
# choose en_US.UTF-8 in the next two screens

When setting up a VPS in Paris data center, in Gandi.net, upon starting the Ubuntu for the first time, I received the following warning message…


-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

References

Solution


sudo locale-gen en_US.UTF-8

sudo update-locale en_US.UTF-8