I've just recently switched to a Mac from Ubuntu. I was disappointed that mac doesn't have the convenient sudo apt-get
in Ubuntu. I've heard that I should use homebrew but I'm not exactly sure what homebrew or macports does?
MacPorts allows the installation of a number of packages by entering the command sudo port install packagename in the Terminal, which will then download, compile if necessary, and install the requested software, while also installing any required dependencies automatically.
Conclusion. If you're looking to improve your productivity and do more with a Mac, command-line package management is the right direction. Homebrew is one of the best free package managers that is relatively easy to use if you have some experience with Terminal.
When we run brew install, Homebrew reads our package's Formula — an implementation of Ruby's abstract Formula class that provides package metadata and installation instructions — to create an executable from our source code and install it locally on our computer.
Homebrew on its own acts like a command-line App Store. It's safe, if you know what you're downloading. It uses SHA256 to fingerprint the downloaded instructions as a validity / tamper detection verification check. It's open, so you could validate what it's downloading and how it works.
MacPorts is the way to go.
Like @user475443 pointed, MacPorts has many many more packages. With brew you'll find yourself trapped soon because the formula you need doesn't exist.
MacPorts is a native application: C + TCL. You don't need Ruby at all. To install Ruby on Mac OS X you might need MacPorts, so just go with MacPorts and you'll be happy.
MacPorts is really stable, in 8 years I never had a problem with it, and my entire Unix ecosystem relay on it.
If you are a PHP developer you can install the last version of Apache (Mac OS X uses 2.2), PHP and all the extensions you need, then upgrade all with one command. Forget to do the same with Homebrew.
MacPorts support groups.
foo@macpro:~/ port select --summary Name Selected Options ==== ======== ======= db none db46 none gcc none gcc42 llvm-gcc42 mp-gcc48 none llvm none mp-llvm-3.3 none mysql mysql56 mysql56 none php php55 php55 php56 none postgresql postgresql94 postgresql93 postgresql94 none python none python24 python25-apple python26-apple python27 python27-apple none
If you have both PHP55 and PHP56 installed (with many different extensions), you can swap between them with just one command. All the relative extensions are part of the group and they will be activated within the chosen group: php55 or php56. I'm not sure Homebrew has this feature.
Rubists like to rewrite everything in Ruby, because the only thing they are at ease is Ruby itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With