MacPorts

MacPorts is a package manager for OS X and is particularly helpful to establish a GNU/Linux environment on OS X. It makes my life easier in general, but needs some trouble-shootings from time to time.

Trouble-shootings

  • Are you behind a firewall? This is the commonest problem I met.
  • Why does MacPorts take forever to build (simple) packages? Try to set the number of simultaneous make jobs to use (see here). You need to know how many cores in your computer (see here). Then, disable spotlight indexing, if necessary (e.g. atlas package).
  • Checksum mismatches. I failed to install ghostscript due to this problem. It is usually due misbehaving DNS or web servers. After resolving the DNS or web server problem, delete the old download (sudo port clean --dist <portname>), and then download and install again.

Alternative

  • Homebrew: I actually like homebrew better, but use MacPorts for historical reason.