Set the PATH environment variable in Mac OS X 10.8 (mountain lion) (used to install macports)

Source: Internet
Author: User
Solution: run the "sudo Vim/etc/paths" command to set the PATH environment variable in Mac to add the path to it. A path must be added to macports in one line: /Opt/local/bin /Opt/local/sbin


Note: even if the script is successfully added, it may not run successfully. The script created in the specified path must be executable. Otherwise, the script will be ignored during search.
Sudo chmod + x xxx

In ubuntu, you only need to modify/etc/. profile or ~ /. Profile or ~ /. Bashrc and other modifications

After installing macports, you must set the PATH environment variable to view the current environment variable. Command: Echo $ PATH macports in Mac OS X to install and use macports.

In addition to installing software using DMG and PKG, macports can be used to install other applications.Program, The same as ports in BSD. Macports can quickly install software like apt-Get and yum.

The installation and usage of macports are recorded here for future reference.

Visit the official website.

Install macports through source

Wget http://distfiles.macports.org/MacPorts/MacPorts-1.9.2.tar.gz
Tar zxvf MacPorts-1.9.2.tar.gz
CD MacPorts-1.9.2
./Configure & make & sudo make install
CD ../
Rm-RF Co., MacPorts-1.9.2 *


Then add/opt/local/bin and/opt/local/sbin to the $ PATH search path.
Edit the/etc/path file and add

/Opt/local/bin
/Opt/local/sbin

 

Use macports
Update the ports tree and macports versions. We strongly recommend that you use the-V parameter during the first running to display detailed update processes.
Sudo port-V selfupdate

Search for software in the Index
Port search name

Install new software
Sudo port install name

Uninstall Software
Sudo port uninstall name

View updated software and version
Port outdated

Update Software
Sudo port upgrade outdated

The Eclipse plug-in requires subclipse to require javahl. The following installation uses macports
Sudo port install subversion-javahlbindings

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.