macOS Sierra 10.12:自制软件无法升级 警告:我们不为此预发布版本提供支持



昨天我升级了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.

我搜索了很长时间来解决这个问题,

例如:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

或:

 sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

然后重新启动操作系统,仍然存在这个问题。

/usr/local已经存在,可以写入。

所以,我不使用brew升级,请帮忙,我有很长一段时间不能使用它。

我也有同样的问题。这对我有效:

转到您的终端,键入这些命令,将whoami更改为您的用户名。

sudo chown -R $(whoami) /usr/local
xcode-select --install

您将授予/usr/local的写入权限,还将从Apple下载并安装命令行开发工具,这可能需要1~2分钟的时间。

如果您看到这样的错误,请尝试运行升级:Homebrew: Error: update-report should not be called directly

brew upgrade

现在进行更新。

brew update

最后你会看到:

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

就这么做吧:

sudo chown root:wheel /usr/local

在尝试了其他一切之后,下面的代码块终于帮我完成了。。。

 cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update

此代码来自brew READMEhttps://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.

我忽略了最后的错误消息,继续。。。

  MacDePadre:local arick$ brew upgrade

我有很多库需要更新,所以花了很长时间,但这似乎解决了问题。

这对我有效:

sudo xcode-select -r
Edit and set the date of your Mac as October 1st, 2019
sudo xcodebuild -runFirstLaunch
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
brew upgrade

您只需升级到Homebrew 1.0.0(1.1.0或1.2.0(。转到brew.sh并按照说明进行操作。

安装Homebrew。缺少macOS的程序包管理器。这解决了我的问题。

步骤:

1.打开端子。

2.粘贴下面的线条。

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

3.点击返回(它将自己完成所有过程。我希望这能对你有所帮助(。

最新更新