Mac os 版本 10.14.1 使用brew安装好了 php56配置好了之后 启动服务
sudo /usr/local/bin/apachectl stop
出现:
httpd: Syntax error on line 130 of /usr/local/etc/httpd/httpd.conf: Cannot load
/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so into server:
dlopen(/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so, 10): Library not loaded:
/usr/local/opt/icu4c/lib/libicui18n.62.dylib\n Referenced from:
/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so\n Reason: image not found
解决:
brew switch icu4c 62.1
引用:
stackoverflow https://stackoverflow.com/questions/53828891/dyld-library-not-loaded-usr-local-opt-icu4c-lib-libicui18n-62-dylib-error-run
In my case that happened because icu4c was upgraded to version 63 but my locally installed postgres image still referenced icu4c 62.1. Therefore i had to change the icu4c version used:
2019/06/08 更新:
switch不了62.1版本了
使用下方的方案:
Turns out I, like @Grey Black, had to actually install v62.1 of icu4c. Nothing else worked.
However, brew switch icu4c 62.1 only works if you have installed 62.1 in the past. If you haven't there's more legwork involved. Homebrew does not make it easy to install previous versions of formulae.
Here's how I did it:
We first need a deep clone of the Homebrew repo. This may take a while:
git -C $(brew --repo homebrew/core) fetch --unshallow
brew log icu4c
to track down a commit that references 62.1; 575eb4b does the trick.
cd $(brew --repo homebrew/core)
git checkout 575eb4b -- Formula/icu4c.rb
brew uninstall --ignore-dependencies icu4c
brew install icu4c
You should now have the correct version of the dependency! Now just to...
git reset && git checkout
. Cleanup your modified recipe.
Added a couple extra notes, thanks to @Noah for the catch