Home > Backend Development > PHP Tutorial > homebrew 升级php失败,求解决方法

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

WBOY
Release: 2016-06-06 20:38:38
Original
956 people have browsed it

升级过程如下:

<code>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
</code>
Copy after login
Copy after login

求解决方法

回复内容:

升级过程如下:

<code>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
</code>
Copy after login
Copy after login

求解决方法

找到解决办法了,如下

<code>cd $(brew --prefix)/Library/Taps/homebrew/homebrew-php
git checkout -- Formula/php56.rb
</code>
Copy after login

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

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

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

<code>bash</code><code>cd /usr/local/Library/Formula/
git reset --hard
</code>
Copy after login

还原全部formula文件就好

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template