MacOsx自动安装工具:brew

安装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


上一篇:生成树状结构的脚本bat\python\shell


下一篇:MacOSX启动SSH服务