关于macos:如何修复brew医生警告

How to fix brew doctor warnings

我不习惯使用Homebrew包管理器,请帮助我学习如何修复我的警告我注意到它会导致python出现问题。 警告如下。

1)Warning:"config" scripts exist outside your system or Homebrew
directories. ./configure scripts often look for *-config scripts to
determine if software packages are installed, and what additional
flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed
via Homebrew if the config script overrides a system or Homebrew
provided script of the same name. We found the following"config"
scripts:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config

2)Warning: Python is installed at /Library/Frameworks/Python.framework

Homebrew only supports building against the System-provided Python or
a brewed Python. In particular, Pythons installed to /Library can
interfere with other software installs.

3)Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked
can lead to build-trouble and cause brews that depend on those kegs to
fail to run properly once built. Run brew link on these: nmap
subversion


看起来您的问题1和2是相关的。 我假设您安装的某些版本的Python超出了默认情况下Mac上的版本。 解决此问题的最简单且最可能的最佳方法是以下步骤:

  • 删除现有的Python
  • 使用以下步骤重新安装Python https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos
  • 运行命令brew link nmap
  • 这应该可以解决您的问题。