Install macports on Mac OS X lion (which makes it easier for you to use MACOs shell)

Source: Internet
Author: User

Reprinted please famous from: Shi Shang Liu Jing Hong poechantcsdn blog, the original link: http://blog.csdn.net/poechant/article/details/7213209


0. What is macports?

Macports is an open-source project initiated by the open-source community to facilitate developers to compile, install, and upgrade software in shell. It aims to facilitate developers in MAC environments. For more information about macports, you can log on to the official website to view: http://www.macports.org

1. Download macports

: Https://distfiles.macports.org/MacPorts/MacPorts-2.0.3-10.7-Lion.dmg

2. Install macports

The installation method is the same as that of other Mac software. After DMG is mounted, enable PKG and follow the wizard step by step. Then, there is no action from drag to application.

(Note: This step is very slow. Some netizens say that the network is disconnected. In this case, some redundant information may be updated .)

3. Check macports Environment Variables

After steps 1 and 2, you can go to shell to view them ~ /. Profile file, you will find that macports has written environment variables to this file during installation, as shown below:

# MacPorts Installer addition on 2012-01-21_at_00:18:10: adding an appropriate PATH variable for use with MacPorts.export PATH=/opt/local/bin:/opt/local/sbin:$PATH# Finished adapting your PATH environment variable for use with MacPorts.

4. Update macports Indexes

What is a macports index? If you have used Linux, you must have used apt-Get or yum, or if you have used BSD, you must have used ports. When you type these commands, press the tab key to get prompts about the software you want to install. These prompts come from their respective indexes. Macports also has similar functions, so indexes are essential. Run the following command in shell:

sudo port -v selfupdate

-V indicates verbose (redundancy), that is, the information is displayed on the shell. "For users who already have macports installed and wish to upgrade to a newer release ."

(Note: I have been waiting for a long time while performing this step. But later I found out that the WiFi I used was too bad---|)

5. Common macports commands

(1) Search for software in macports Indexes

port search NAME

(2) install new software

sudo port install NAME

(3) uninstall installed software

sudo port uninstall NAME

(4) View software of a lower version

port outdated

(5) software with a low version

sudo port upgrade outdated

(6) Update macport

sudo port selfupdate

6. Use instances

If you have (or at the same time) been a Linux hacker (or CODER), you must always use wget. Use macports to install a wget file :)

sudo port install wget

7. References

Http://guide.macports.org/#installing

Http://www.macports.org/index.php

Http://apps.hi.baidu.com/share/detail/16970994

OK, have a nice journey with macports!

-

Reprinted please famous from: Shi Shang Liu Jing Hong poechant csdn blog, the original link: http://blog.csdn.net/poechant/article/details/7213209

-

Related Article

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.