mac下homebrew一些总结

最近使用brew来安装python,但是安装过程中报下面的错:

☁  ~  brew search python
==> Searching local taps...
app-engine-python     gst-python            micropython           python3
boost-python          ipython               python                wxpython
[email protected]     ipython@5             python-markdown       zpython
==> Searching taps on GitHub...
Error: GitHub
The GitHub credentials in the macOS keychain may be invalid.
Clear them with:
  printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
Or create a personal access token:
  https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"

上面提示很清楚,就是要你在github上面设置一下github信任的token提供给brew,这样brew就凭token访问github。

现在只要按照上面的链接点进去,创建一个token,然后执行如下操作,就可以了。

export HOMEBREW_GITHUB_API_TOKEN="your_new_token"

现在我们再执行 brew search python 之后就不会有问题了,记录下!

☁  ~  brew search python
==> Searching local taps...
app-engine-python     gst-python            micropython           python3
boost-python          ipython               python                wxpython
[email protected]     ipython@5             python-markdown       zpython
==> Searching taps on GitHub...
caskroom/cask/awips-python                   caskroom/cask/mysql-connector-python
caskroom/cask/kk7ds-python-runtime
==> Searching blacklisted, migrated and deleted formulae...

If you meant "python" specifically:
It was migrated from caskroom/cask to homebrew/core.

你可能感兴趣的:(macos,homebrew,python)