欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2024-01-06 22:24:52
...
升级过程如下:
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

求解决方法

回复内容:

升级过程如下:

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

求解决方法

找到解决办法了,如下

cd $(brew --prefix)/Library/Taps/homebrew/homebrew-php
git checkout -- Formula/php56.rb

另外很感谢@mcfog 提供的PHPBrew,很值得推荐,我会尝试的

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

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

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

还原全部formula文件就好

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

相关标签: homebrew php

上一篇:

下一篇: