カテゴリー : 2017年 1月

[Nginx] http を https にリダイレクトする設定 & HTTP Strict Transport Security (HSTS) 対応

Nginx で http リクエストを https にリダイレクトする設定と HTTP Strict Transport Security (HSTS) の設定の2つをご紹介します。

Nginx

続きを読む

[Mac] brew update で Error: /usr/local must be writable! 対応

brew update で Error: /usr/local must be writable! がでたときの対応方法です。

$ brew update
Error: /usr/local must be writable!

調べるとまず brew doctor してみてと書いてあったので、やってみます。

$ brew doctor
 
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
 
Warning: /usr/local is not writable.
 
You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local
 
Warning: /usr/local is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. For example, upgrading
to OS X El Capitan has been known to do this. Some versions of the
"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations
are known to do this as well.
 
You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local
 
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
  brew install oniguruma
 
Run `brew missing` for more details.
 
Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

sudo chown -R $(whoami) /usr/local しろと書かれているので、実行して brew update を再実行してみます。

sudo chown -R $(whoami) /usr/local

次は update.sh: line 13: /usr/local/Library/ENV/scm/git: No such file or directory ってエラーが発生しました。

brew update
 
/usr/local/Library/Homebrew/cmd/update.sh: line 13: /usr/local/Library/ENV/scm/git: No such file or directory
()
/usr/local/Library/Homebrew/cmd/update.sh: line 13: /usr/local/Library/ENV/scm/git: No such file or directory
Error: update-report should not be called directly!
brew prune

たまに brew update すると苦労しますね・・・。

参考情報

[Git] merged な remote branch を一括削除するコマンド

Git で merged な remote branch を一括削除するコマンドをご紹介します。

Git | ギット

続きを読む

[WordPress] AMP プラグインを利用して Accelerated Mobile Pages 対応する方法

WordPress で「AMP」プラグインを利用して Accelerated Mobile Pages 対応した道のりをご紹介します。

WordPress | ワードプレス

続きを読む

[MongoDB] Storage Engine の確認方法

MongoDB で Storage Engine (ストレージエンジン) を確認する方法をご紹介します。

MongoDB | モンゴディービー

続きを読む