mac使用brew安装的php71,使用php -v时报错

-bash: /usr/bin/php: No such file or directory

原因:未找到可执行文件php

解决办法:在/usr/bin/路径下 创建执行文件路径的硬链接

ln -s /usr/local/Cellar/php@7.1/7.1.25/bin/php  /usr/bin/php

(前面的路径是本机地址)

更多推荐

-bash: /usr/bin/php: No such file or directory解决办法