macos - PHP: Unable to load dynamic library (OSX)


I am trying to run a CakePHP app. I've been working for a while in this app and recently I had to install a new dependency (using composer). Once I installed it this error came up and I can't run the app anymore:

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

When I open that folder I can see a different version of that library:


But the system is looking for


How can I install the 56 version of that library or upgrade the intl so it uses version 57?

Is that what I need to do?





I have the same question when i upgrade node to v8.x. After i runbrew upgrade node,theicu4c was updated. I solve the problem by under command: brew unlink php56-intl brew remove php56-intl brew install php56-intl

so, i feel you should reinstall intl extension.

People are also looking for solutions to the problem: Regex PHP remove certain keyword


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.