Homebrew是Mac上的软件包管理工具,使用该工具能够很方便的在Mac上安装和卸载软件。
一、Homebrew的安装
######官网:https://brew.sh/index_zh-cn.html(也可以参考官网安装)
Homebrew的安装很简单,只需在终端下输入如下指令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装完毕的提示:
Snip20171104_2.png
二、如果安装中途报错的话解决方案如下:
错误.png
解决方法:
1.在终端输入命令 export PATH=/usr/local/bin:$PATH,然后回车。
2.继续输入/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"进行安装即可。
Mac通过Brew来安装Python,使用Brew Doctor检查出现关于./configure的问题,解决方法:
问题描述:
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/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
解决方法:
sudo rm -rf /Library/Frameworks/Python.framework
网友评论