[Nginx] http を https にリダイレクトする設定 & HTTP Strict Transport Security (HSTS) 対応
- 2017 1/24
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 すると苦労しますね・・・。
WordPress で「AMP」プラグインを利用して Accelerated Mobile Pages 対応した道のりをご紹介します。
まず、AMP を管理画面からインストールして、プラグインを有効化します。
Not a valid AMP page
Invalid AMP pages will not have AMP-specific features in Google search results
というエラーメッセージが出ていますね。
Prohibited or invalid use of HTML Tag
- The tag ‘plusone’ is disallowed.
- The tag ‘share-button’ is disallowed.
不正な HTML タグを確認してみたところ、どちらも WP Social Bookmarking Light プラグインを使って設置しているボタンが原因みたいでした。
Google +1 ボタンは AMP Valid な HTML タグに変更する設定が見当たらなかったので、この機会に削除しました。
Facebook Share ボタンはタグの設定を xfbml から html5 へ変更することで対応しました。
対応後に再び AMP Test をかけてみると Valid AMP page のメッセージが無事、表示されました。
Accelerated Mobile Pages のエラーは Search Console から確認することができます。
HTML タグの禁止された用法、無効な用法(問題の重大性: 致命的) などの重要な通知
AMP 対応しておくと Google に気に入られて SEO 効果もあるかもしれません。
基本的にプラグイン1つで対応できるので、早めに AMP 対応をしておくとライバルサイトに差をつけることができるかもしれませんね。