MacPorts

MacPorts is like apt-get for OSX

sudo port install <package>

Updating MacPorts (Selfupdate)

MacPorts is like apt-get, where you should periodically run an “update”.

sudo port selfupdate

W/debug flag, in case you run into problems (which you will)

sudo port -d selfupdate

Finding Programs (Ports)

port search <program>

Finding Locally Installed Programs

This can help you find out what files were installed for a particular program. To list all the programs that macports has installed, use

port installed

What files were installed by a program?

To list the specific files that belong to a program, use:

port contents <program>

Removing Old Builds

Ryan said that this could take hours (or days) to run.

But, I'm trying to compile Gobber, and I'm getting errors like:

Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_glibmm/work/glibmm-2.18.1" && ./configure --prefix=/opt/local " returned error 1
checking for pkg-config... /opt/local/bin/pkg-config
checking for GLIBMM... configure: error: Package requirements (sigc++-2.0 >= 2.0.0 glib-2.0 >= 2.17.3 gobject-2.0 >= 2.17.3 gmodule-2.0 >= 2.17.3) were not met:

Requested 'glib-2.0 >= 2.17.3' but version of GLib is 2.14.1
Requested 'gobject-2.0 >= 2.17.3' but version of GObject is 2.14.1
Requested 'gmodule-2.0 >= 2.17.3' but version of GModule is 2.14.1
sudo port -fuv upgrade outdated

Example

I installed 7zip using the following commands:

# I didn't know what the exact package was, so I used:
port search zip | more

# I found the p7zip package, and wanted to make sure this was
# what I wanted.  I used:
port info p7zip

# The following line was printed to my screen:
# p7zip is a port of 7-Zip, a file archiver with highest compression ratio.

# I installed p7zip using
sudo port install p7zip

# Then, I didn't know how to run p7zip, so I used:
port contents p7zip
# I looked through the output of the above command, and saw:
# /opt/local/bin/7za
# /opt/local/lib/p7zip/7za
# /opt/local/lib/p7zip/7zCon.sfx
# /opt/local/share/doc/p7zip-4.57/ChangeLog
# I assumed that the /bin directory had the name of the command, so I tried running
# "7za" and it worked!

See Also: http://guide.macports.org/#using.port.contents

 
macports.txt · Last modified: 2010/01/25 12_18 by tookelso
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki