首页 > 技术文章 > Mac使用brew找不到php7.1

au_ww 2020-08-12 16:32 原文

Mac使用brew找不到php7.1
[https://blog.csdn.net/weixin_44253824/article/details/104078107]

切换版本后,修复 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
[https://stackoverflow.com/questions/53828891/dyld-library-not-loaded-usr-local-opt-icu4c-lib-libicui18n-62-dylib-error-run]

I am actually quite surprised that this solution has not been presented yet, and I feel like it is the easiest solution.

Go to GitHub, find the version of the brewfile that matches the version of icu4c that you need and get the raw version of the file (follow the links above and click View File then Raw).

Then just have brew reinstall from that url.

For example, version 62.1:
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/575eb4bbef683551e19f329f60456b13a558132f/Formula/icu4c.rb

安装切换版本命令 brew install brew-php-switcher brew-php-switcher 7.2
修复切换后 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib brew switch icu4c 62.1 brew switch icu4c 64.2

推荐阅读