mac dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib 问题解决

在查看php版本的时候,输入php -v,结果出现如下错误:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
  Referenced from: /usr/local/opt/[email protected]/bin/php
  Reason: image not found
[1]    91582 abort      php -v

google了一下,发现只要输入一条命令即可解决:

brew switch icu4c 62.1

再输入:php -v,成功显示版本信息:

PHP 7.0.31 (cli) (built: Jul 19 2018 23:41:03) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.31, Copyright (c) 1999-2017, by Zend Technologies

你可能感兴趣的:(php,mac)