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