Help us understand the problem. What is going on with this article?

MacでbrewでPHP5.6.7にすると、opcache.soが見つからなくてエラーになる

More than 3 years have passed since last update.

brew upgrade したphp5.6(5.6.6->5.6.7)が、以下の様にopcache.soがねーよバーカと言われた。

$ php -a
Failed loading /usr/local/Cellar/php56/5.6.7/lib/php/extensions/no-debug-non-zts-20131226/opcache.so:  dlopen(/usr/local/Cellar/php56/5.6.7/lib/php/extensions/no-debug-non-zts-20131226/opcache.so, 9): image not found

つらい。
ちなみに、以下の5.6.6のパスにはある。

/usr/local/Cellar/php56/5.6.6/lib/php/extensions/no-debug-non-zts-20131226/opcache.so

以下を参考にして対応。
https://github.com/Homebrew/homebrew-php/issues/1620
opcacheを別途インストールして、設定ファイルから記述を削除すればいいっぽい。

# opcache インストール
brew install php56-opcache
# 設定ファイルから記述を削除
# opcache.so を読み込まないようにするため、ext-opcache.ini をなかったことにし、php.ini からも記述を削除。
mv /usr/local/etc/php/5.6/conf.d/{ext-opcache.ini,ext-opcache.ini.bak}
vi /usr/local/etc/php/5.6/php.ini
# [opcache]
# ; Load the opcache extension
# ;zend_extension=opcache.so

php -a

動いたー

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away