nodeを更新した場合に発生します。
php -v
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicuio.67.dylib
Referenced from: /Users/jun/.anyenv/envs/phpenv/versions/7.4.8/bin/php
Reason: image not found
まずは、brewのパッケージをアップデートして、その後PHPを再ビルドすると動きます。
brew update
brew upgrade
brew cleanup
CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib) \
--with-bz2=$(brew --prefix bzip2) \
--with-curl=$(brew --prefix curl) \
--with-iconv=$(brew --prefix libiconv) \
--with-libedit=$(brew --prefix libedit) \
--with-readline=$(brew --prefix readline) \
--with-tidy=$(brew --prefix tidy-html5)" \
phpenv install 7.4.8