Install the MacPorts software (free): http://www.macports.org (Follow the installation instructions on this site.)