PEAR安装错误:dyld:库未加载

I am trying to install PEAR on OS X Yosemite (10.10).

I changed to /usr/lib/php and executed sudo php install-pear-nozlib.phar as shown here.

Another way I tried was going to /usr/local and executing curl -O http://pear.php.net/go-pear.pharand sudo php -d detect_unicode=0 go-pear.pharas shown here.

However, in each case I get the error message

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.52.1.dylib
Referenced from: /usr/local/bin/php
Reason: image not found

How can I get this working? Any ideas? Thanks!

you can either install pear this way

curl -O http://pear.php.net/go-pear.phar
sudo php go-pear.phar

if you have a mac, I would recommend that you use mac ports

port install pear-PEAR