PHP intl.so fails

2019-02-26 12:45发布

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.56.dylib
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so Reason: image not found in Unknown on line 0

I recently was trying to install MongoDB for PHP, I used

 brew install homebrew/php/php55-mongodb

This installed a whole load of other requirements and now intl.so for PHP is broken. I get the above error whenever I run composer update and the libs I have that need intl.so now break and say its not present.

I believe this is related to the issue but it offers no solution https://github.com/Homebrew/homebrew-php/issues/2544

How can I undo this mess?

1条回答
淡お忘
2楼-- · 2019-02-26 13:29

After more digging I removed, then installed intl using pecl and this seems to have worked. I also removed and then reinstalled icu4c as this is a related package that causes the issue;

sudo pecl remove intl
brew unlink icu4c
brew remove icu4c
brew install icu4c
sudo pecl install intl
查看更多
登录 后发表回答