The Yun command homebrew in Mac

Source: Internet
Author: User
Tags install homebrew tar xz

Macports and homebrew are both software package management tools (via Wikipedia) on Mac OS X and are incompatible with each other. here we will not introduce the benefits. We will talk about deleting macports and installing homebrew.

Prerequisites:

  • Mac comes with a ruby program. If you "process" it, make sure it exists. Use ruby-V to view the version number.
  • Install xcode
  • Open terminal (Terminal)

Delete macports:

# The software installed using macports in the original version is in the/opt/local directory. You 'd better check the number of software installed before deleting it.

Sudo port-F uninstall installed
Sudo Rm-RF \
/Opt/Local \
/Applications/darwinports \
/Applications/macports \
/Library/launchdaemons/org. macports .*\
/Library/Receipts/darwinports *. PKG \
/Library/Receipts/macports *. PKG \
/Library/startupitems/darwinportsstartup \
/Library/Tcl/darwinports1.0 \
/Library/Tcl/macports1.0 \
~ /. Macports

 

No sudo:

Sudo chown-r 'whoam'/usr/local

# Do not execute the sudo operation every time

 

Install homebrew:

Curl-l http://github.com/mxcl/homebrew/tarball/master | tar xz-strip 1-C/usr/local

Export Path =/usr/local/bin: $ path

# After the installation is complete, it is installed in the/usr/local directory. You can view the version number through brew-v.

Install software through homebrew:

Find the software you need and run the brew search * command to install and use the brew install * command (Replace with the specific software name *). The following is an example:

Brew search git

Brew install git

If you want to install vim, wget, unrar, and other software, do the same.

In addition, if you have installed git, you have created a local git repository and executed the following:

  • CD/usr/local
  • Git init
  • Git remote add origin git: // github.com/mxcl/homebrew.git
  • Git pull origin master

If there is a project on GitHub, you can also take it directly:

  • Git clone http://github.com/YOURGITHUBUSERNAME/homebrew.git/tmp/homebrew
Other homebrew commands:

Brew list-List Installed Software

Brew Update-update homebrew

Brew home *-open in a browser

Brew info *-display software content

Brew deps *-display package Dependencies

Brew server *-start the Web server. You can access http: // localhost: 4567/in a browser to manage packages on the same webpage.

Brew-H brew-help

 

Delete homebrew:

In case you are uncomfortable, tell you to uninstall the command:

  • CD 'brew-prefix'
  • Rm-RF cellar
  • Brew prune
  • Rm-RF library. Git. gitignore bin/brew readme. md share/man/Man1/brew
  • Rm-RF ~ /Library/caches/homebrew

Complete.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.