MacOS在没有安装xcode状况下使用homebrew

当没有xcode时,咱们使用homebrew会提示出错。xcode

Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool工具

或者出现this

Error: The /usr/local directory is not writable.命令行

Even if this directory was writable when you installed Homebrew, othercode

software may change permissions on this directory. Some versions of thecomponent

"InstantOn" component of Airfoil are known to do this.homebrew

You should probably change the ownership and permissions of /usr/localip

back to your user account.开发

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

 

在某些状况下,咱们须要使用mac的命令行工具(如homebrew),但不想安装xcode开发环境。这时,咱们须要

更新xcode的开发连接路径,使之指向实际的命令行工具路径。

sudo xcode-select --switch /Library/Developer/CommandLineTools

这样,homebrew就能找到环境了。

相关文章
相关标签/搜索