Mar*_*cos 9 macos homebrew macos-sierra
昨天我升级macOS Sierra,当我冲泡upgade时,出现错误:
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
Run Code Online (Sandbox Code Playgroud)
我长时间搜索解决这个问题,
例如:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)
要么:
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
Run Code Online (Sandbox Code Playgroud)
然后重启操作系统,仍有这个问题.
/ usr/local已经存在,可以写入.
所以,我不使用brew升级,请帮忙,我好久不能用它.
我有同样的问题.这对我有用:
转到您的终端,输入这些命令,将whoami更改为您的用户名.
sudo chown -R $(whoami) /usr/local
xcode-select --install
Run Code Online (Sandbox Code Playgroud)
您将获得写入权限,/usr/local并且您将从Apple 下载并安装Command Line Developer Tools,可能需要1~2分钟.
如果您看到此类错误,请尝试运行升级:Homebrew: Error: update-report should not be called directly
brew upgrade
Run Code Online (Sandbox Code Playgroud)
现在进行更新.
brew update
Run Code Online (Sandbox Code Playgroud)
最后你会看到:
Homebrew no longer needs to have ownership of /usr/local. If you wish
you can return /usr/local to its default ownership with: sudo chown
root:wheel /usr/local
Run Code Online (Sandbox Code Playgroud)
去做就对了:
sudo chown root:wheel /usr/local
Run Code Online (Sandbox Code Playgroud)
在尝试了其他所有内容后,以下代码块最终为我做了...
cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update
Run Code Online (Sandbox Code Playgroud)
此代码来自brew README https://github.com/Homebrew/brew/#update-bug.
运行之后,这就是我得到的......
==> Migrating HOMEBREW_REPOSITORY (please wait)...
Error: /usr/local/Homebrew already exists.
Please remove it manually or uninstall and reinstall Homebrew into a new
location as the migration cannot be done automatically.
Run Code Online (Sandbox Code Playgroud)
我忽略了最后的错误信息,继续......
MacDePadre:local arick$ brew upgrade
Run Code Online (Sandbox Code Playgroud)
我有一堆需要更新的库,所以花了很长时间,但这似乎解决了这个问题.
| 归档时间: |
|
| 查看次数: |
9020 次 |
| 最近记录: |