Category: macOS

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

Save Screenshots Space on Mac

If you use mac OS and if you think you might run out of disk space at some point in the future (everybody does this), then here is a small (advanced) tip to help to optimise the space, especially if you take a lot of screenshots.

I was going through the random video on youtube and stumbled upon this gem…

You may know the commands used in it at http://snazzylabs.com/tutorial/five-advanced-tricks-for-mac-users/ . I am just going to explain the first tip. It basically uses the following command…

defaults write com.apple.screencapture type jpg

I didn’t want to simply type it down. So, I tried the following…

defaults read com.apple.screencapture

It didn’t show any results. It basically means the default value isn’t setup specifically. So, I executed the original command, tested if it really saved any space and type the following command to see, if I can go back to the default option.

defaults delete com.apple.screencapture

It did work. So, go ahead and do it yourself. You can thank me later!