MacOsx自动安装工具:brew

简介: 安装brew的执行命令curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1安装cocoapods:su...

安装brew的执行命令

curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1


安装cocoapods:

sudo brew install cocoapods

卸载

sudo brew uninstall cocoapods


遇到的问题一:执行brew install xxx安装某个软件的时候报错,错误内容:uninitialized constant Homebrew::HOMEBREW_CASK_TAP_CASK_REGEX

解决办法:执行brew doctor诊断之后再执行brew install ***安装某个软件,此时就会自动更新HomeBrew。相当于修复了brew,然后安装就成功了。

MacdeMacBook-Air:cmake-3.8.0-rc2 mac$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: /usr/local/bin isn't writable.

This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably change the ownership and permissions of /usr/local/bin
back to your user account.
  sudo chown -R $(whoami) /usr/local/bin

Warning: /usr/local/share isn't writable.

This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably change the ownership and permissions of /usr/local/share
back to your user account.
  sudo chown -R $(whoami) /usr/local/share
Error: undefined method `rebuild' for #<BottleSpecification:0x007f8ee908a708>
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb:10:in `block in <class:Findutils>'
/usr/local/Library/Homebrew/software_spec.rb:91:in `instance_eval'
/usr/local/Library/Homebrew/software_spec.rb:91:in `bottle'
/usr/local/Library/Homebrew/formula.rb:1726:in `bottle'
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb:8:in `<class:Findutils>'
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb:1:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:21:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:21:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:34:in `load_formula_from_path'
/usr/local/Library/Homebrew/formulary.rb:83:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:74:in `klass'
/usr/local/Library/Homebrew/formulary.rb:70:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:207:in `factory'
/usr/local/Library/Homebrew/formula.rb:1183:in `[]'
/usr/local/Library/Homebrew/diagnostic.rb:1217:in `check_for_non_prefixed_findutils'
/usr/local/Library/Homebrew/cmd/doctor.rb:34:in `block in doctor'
/usr/local/Library/Homebrew/cmd/doctor.rb:27:in `each'
/usr/local/Library/Homebrew/cmd/doctor.rb:27:in `doctor'
/usr/local/Library/brew.rb:84:in `<main>'

MacdeMacBook-Air:Downloads mac$ brew install yasm
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
teleport
==> Updated Formulae
gnuradio                                 mkdocs
==> Renamed Formulae
ffmpeg28 -> ffmpeg@2.8
freetds091 -> freetds@0.91
giflib5 -> giflib@5
glfw2 -> glfw@2
gnupg21 -> gnupg@2.1
gnuplot4 -> gnuplot@4
gradle214 -> gradle@2.14
grails25 -> grails@2.5
gsl1 -> gsl@1
gst-ffmpeg010 -> gst-ffmpeg@0.10
gst-plugins-bad010 -> gst-plugins-bad@0.10
gst-plugins-base010 -> gst-plugins-base@0.10
gst-plugins-good010 -> gst-plugins-good@0.10
gst-plugins-ugly010 -> gst-plugins-ugly@0.10
gstreamer010 -> gstreamer@0.10

Error: Could not link:
/usr/local/share/doc/homebrew

Please delete these paths and run `brew update`.
==> Migrating HOMEBREW_REPOSITORY (please wait)...
Error: /usr/local/Homebrew already exists.
Please remove it manually or uninstall and reinstall Homebrew into a new
location as the migration cannot be done automatically.
Warning: yasm-1.3.0 already installed


目录
相关文章
|
1月前
|
开发工具 git iOS开发
Mac 安装软件包管理工具Homebrew
Mac 安装软件包管理工具Homebrew
|
iOS开发 芯片 MacOS
macOS M1芯片版本必备Oh My Zsh、Homebrew安装教程
Oh My Zsh和Homebrew安装教程。用于Terminal优化及macOS包管理工具。
2046 0
|
3月前
|
Shell 开发工具 iOS开发
macos 安装brew
macos 安装brew
57 0
|
7月前
|
缓存 开发工具 git
Homebrew安装
Homebrew安装
|
9月前
|
Linux Shell 开发工具
MacOS安装Homebrew与Oh-My-Zsh
MacOS安装Homebrew与Oh-My-Zsh
995 0
|
Ubuntu Linux Shell
ubuntu上安装spyder
ubuntu上安装spyder
561 0
|
存储 自然语言处理 Ubuntu
Ubuntu 20.04 上安装使用 ibus-rime(超实用)
Ubuntu 20.04 上安装使用 ibus-rime(超实用)
1426 0
|
Linux
packetdrill工具安装
packetdrill工具安装
220 0
packetdrill工具安装
|
Linux
Ubuntu下安装使用Xfce4
安装: 代码: sudo  apt-get  install  xfce4  xfce4-taskbar-plugin (xfce4-taskbar-plugin是我需要,你可不用,完整安装xfce4 的桌面环境: sudo apt-get install xfld-desktop ) 现在直...
2192 0
|
Go 开发工具 git
Mac系统下安装和卸载HomeBrew的方法
安装命令如下: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 卸载命令如下: /usr/bin/ruby -e "$(curl -fsSL https://raw.
2456 0