brew update error: Your local changes to the following files would be overwritten by merge
来源:互联网 发布:借壳上市 知乎 编辑:程序博客网 时间:2024/05/14 10:58
brew update error: Your local changes to the following files would be overwritten by merge
今天更新mac os 10.11.1 ,然后顺便更新了 xcode
然后我用brew 安装 autoconf和automake
➜ /Users/zhangzhi >brew install autoconf automake
然后报错
==> Downloadinghttps://github.com/facebook/watchman/archive/v2.9.3.tar.gzAlready downloaded: /Library/Caches/Homebrew/watchman-2.9.3.tar.gz==> ./autogen.sh==> ./configure --prefix=/usr/local/Cellar/watchman/2.9.3 --with-pcrechecking for gcc… clangchecking whether the C compiler works… noconfigure: error: in /private/tmp/watchman-Ww0t/watchman-2.9.3': configure: error: C compiler cannot create executables See
config.log’ for more detailsError: Homebrew doesn’t know what compiler versions ship with your versionof Xcode (7.1). Pleasebrew update
and if that doesn’t help, filean issue with the output of brew --config
:https://github.com/Homebrew/homebrew/issues
Note that we only track stable, released versions of Xcode.
Thanks!
READ THIS:https://github.com/Homebrew/homebrew/wiki/troubleshooting
于是打算升级 brew
➜ /Users/zhangzhi >brew update
接着出现了这样的错误
error: Your local changes to the following files would be overwritten by merge:Library/ENV/4.3/xcrunLibrary/brew.rbPlease, commit your changes or stash them before you can merge.AbortingError: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master➜ /Users/zhangzhi >brew doctorWarning: The /usr/local directory is not writable.Even if this directory was writable when you installed Homebrew, othersoftware may change permissions on this directory. Some versions of the“InstantOn” component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/localback to your user account.
Warning: Ruby version 2.0.0 is unsupported.Homebrew is developed and tested on Ruby 1.8.x, and may not work correctlyon other Rubies. Patches are accepted as long as they don’t break on 1.8.x.Error: Homebrew doesn’t know what compiler versions ship with your versionof Xcode (7.1). Pleasebrew update
and if that doesn’t help, filean issue with the output of brew --config
:https://github.com/Homebrew/homebrew/issues
Note that we only track stable, released versions of Xcode.
Thanks!
无法获取最新的代码,于是我开启 brew 诊断模式看看
➜ /Users/zhangzhi >brew doctor
诊断信息如下:
Warning: The /usr/local directory is not writable.Even if this directory was writable when you installed Homebrew, othersoftware may change permissions on this directory. Some versions of the“InstantOn” component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/localback to your user account.
Warning: Ruby version 2.0.0 is unsupported.Homebrew is developed and tested on Ruby 1.8.x, and may not work correctlyon other Rubies. Patches are accepted as long as they don’t break on 1.8.x.Error: Homebrew doesn’t know what compiler versions ship with your versionof Xcode (7.1). Pleasebrew update
and if that doesn’t help, filean issue with the output of brew --config
:https://github.com/Homebrew/homebrew/issues
Note that we only track stable, released versions of Xcode.
Thanks!
第一个问题:The /usr/local directory is not writable.
/usr/local 目录竟然没有写的权限
我们需要 sudo 权限下给 /usr/local 目录改变权限
sudo chown -R $USER /usr/local
运行后, /usr/local 已经有了读写权限
第二个问题,拉取最新的 brew 代码
按照从上到下步骤依次运行
- cd
brew --prefix
- cd
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master
上面步骤依次执行完以后,再去更新brew update
➜ /usr/local git:(master) >brew update
最后结果:
➜ /usr/local git:(master) >brew updateAlready up-to-date.
提示你更新完成
- brew update error: Your local changes to the following files would be overwritten by merge
- Error pulling origin: error: Your local changes to the following files would be overwritten by merge
- Error pulling origin: error: Your local changes to the following files would be overwritten by merge
- Git pull error:Your local changes to the following files would be overwritten by merge解决方法
- Git pull error: Your local changes to the following files would be overwritten by merge:
- git使用error: Your local changes to the following files would be overwritten by merge:
- error: Your local changes to the following files would be overwritten by merge:
- error: Your local changes to the following files would be overwritten by merge
- [Git] error: Your local changes to the following files would be overwritten by merge
- [Git] error: Your local changes to the following files would be overwritten by merge
- 解决error: Your local changes to the following files would be overwritten by merge
- error: Your local changes to the following files would be overwritten by merge:
- error Your local changes to the following files would be overwritten by merge
- git提示 error: Your local changes to the following files would be overwritten by merge:
- Your local changes to the following files would be overwritten by merge
- Your local changes to the following files would be overwritten by merge: git
- git pull 时出现 error: Your local changes to the following files would be overwritten by merge的解决办法
- git 提交后“Error: Your local changes to the following files would be overwritten by merge”解决办法
- 栈和队列
- ubunut支持的笔记本查询
- Redis笔记(八)Redis的持久化
- 30天自制操作系统-第4天心得笔记
- Excel Macros 的使用
- brew update error: Your local changes to the following files would be overwritten by merge
- java程序员从笨鸟到菜鸟之(六)继承详解
- javascript 幻灯片代码(含自动播放)
- input的改变placeholder的颜色
- Redis不同数据类型的的数据结构实现
- 我为国内微积分“小糊涂”感到悲哀!
- 如何做数据分析
- css3 mix-blend-mode 混合模式详解
- jsp、freemarker、velocity 三者的区别与优缺点