What is the official installer for Unix packages on Mac OS?

8,131

Solution 1

There isn't an official package manager for OS X.

Fink, MacPorts, and Homebrew provide their own differing features and functionality to fill this void.

As pointed out by many users:

  • avoid using /usr
  • until you configure your PATH, packages from different directories won't be found.

Solution 2

Although there is no official Unix / FOSS package manager for Mac OS X, it should be noted that MacPorts was created and is still primarily maintained by Apple's Mac OS X / Darwin engineers. The macports.org website is hosted on Apple's servers, as part of Apple's "MacOSForge.com" project. Because Mac OS X / Darwin is *BSD based, many of Apple's Unix-layer software engineers come from the *BSD traditions, so they modeled MacPorts after the *BSD "ports" model.

Fink was the original open source package manager for Mac OS X, but it does not have the close organizational ties to Apple, and it chose to follow the Debian Linux apt-get tradition.

I'm not sure any of the details above is enough to recommend one over the other. I would say it comes down to which model you're already more familiar with. If you're more familiar with apt-get, go with Fink. If you're more familiar with BSD "ports", go with MacPorts.

As others have said, you're best off leaving Mac OS X's default Unix tools alone. Fink and MacPorts have learned that lesson already and install their own copies of things in their own directory hierarchies (/sw for Fink, /opt for MacPorts). Homebrew has not yet fully learned that lesson, but they will, as soon as some user uses Homebrew to update the built-in copy of, say, Perl or Python, and it has some unforeseen compatibility problem that breaks built-in pieces of Mac OS X, such as installer packages (Mac OS X .pkg bundle files) that use Perl scripts to perform some of the installation tasks.

Solution 3

There is no official package manager for OS X.

Fink is probably saying it's not installed because it's not installed in the Fink path. I ran into problems when installing something from either Fink or MacPorts, or duplicate copies with different version numbers.

Pick one and stick to it. If you feel you have to change, it would be best to wipe out the other package manager and reinstall from the new one.

Solution 4

The version of svn you're seeing came with Mac OS X -- not from Fink or any other source.

You can identify different versions using bash's type command. For example, I use MacPorts and installed a newer version of sqlite3:

$ type -a sqlite3
sqlite3 is /opt/local/bin/sqlite3
sqlite3 is /usr/bin/sqlite3

The version in /opt/local/bin came from MacPorts, the version in /usr/bin came with Mac OS X.

I recommend that you do not install Fink or MacPorts binaries into /usr -- leave those alone. Let Fink install in /sw or MacPorts install in /opt/local. Adjust your PATH to find the Fink/MacPorts versions before the standard versions

Share:
8,131
dehmann
Author by

dehmann

Updated on September 17, 2022

Comments

  • dehmann
    dehmann almost 2 years

    I'm a bit confused about the installation of standard Unix packages on Mac OS X. For example, I have /usr/bin/svn, which is SVN v.1.4.4, but FinkCommander says svn is not installed. The same holds for other packages, like emacs etc.

    Is that just a wrong FinkCommander setting? Currently it is set to install everything in /sw, which is not even in the PATH. So, do I just have to set it to install packages to /usr, and it will recognize the installed software? I don't want to install duplicate packages of everything, and it is quite weird that the FinkCommander seems not to be in sync with the installed software.

    Or is there any other installer I should be using? Is Mac Ports the recommended installer to use?

    (I'm using Mac OS 10.5.8.)

    • Assaf Levy
      Assaf Levy over 14 years
      Good question and some great answers. Also check out this one: superuser.com/questions/28529/macports-fink-etc
    • dehmann
      dehmann about 14 years
      As for MacPorts: Compiling every package from scratch is just crazy. I find myself leaving the laptop on for days and nights now just to install R with MacPorts (which first compiles gcc43, perl, automake, glib2, and many more ... ).
  • Jeremy L
    Jeremy L over 14 years
    Using similar flags, you can use which -a sqlite3
  • dehmann
    dehmann over 14 years
    Thanks for the answer. That's quite disappointing. Why can't they offer a proper package manager? :-(
  • Jeremy L
    Jeremy L over 14 years
    Their target audience wouldn't know what to do. The rest of us make it work :-)
  • dehmann
    dehmann about 14 years
    I pick it as accepted answer, but I'd add that it is actually fine to use multiple managers. At least Fink and MacPorts can coexist, since they install into different directories.
  • elasticrat
    elasticrat over 13 years
    It would be impossible using Homebrew to overwrite your existing components. OSX ships with no /usr/local by default.