我试着做以下事情:
brew -v install gdb --with-python=python3
但我收到警告:
Warning: gdb: this formula has no --with-python= option so it will be ignored!
这是正常的,没有--with-python=python3
选项。您可以使用brew info gdb
获取所有可用选项。您将获得:
==> Options
--with-all-targets
Build with support for all targets
[email protected]
Build with [email protected] support
--with-python
Use the Homebrew version of Python; by default system Python is used
--with-python@2
Build with python@2 support
--with-version-suffix
Add a version suffix to program
有--with-python
选项。
--with-python Use the Homebrew version of Python; by default system Python is used
设置默认的python版本后尝试brew -v install gdb --with-python
。