homebrew 升级php失败,求解决方法


升级过程如下:


 brew update
error: Your local changes to the following files would be overwritten by merge:
    Formula/php56.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failed to update tap: homebrew/php

求解决方法

homebrew php

低调的过客 9 years, 9 months ago

提示很明确啊,php56.rb本地被改过,需要还原才能更新

如果你不清楚怎么被改过的话,直接


 bash


 cd /usr/local/Library/Formula/
git reset --hard

还原全部formula文件就好

顺带继续推荐更好支持多php版本,编译更方便的 PHPBrew

pigpork answered 9 years, 9 months ago

Your Answer