20

How to do "sudo apt-get install " on OSX?

TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
  • possible duplicate of [What is the difference/usage of homebrew, macports or other package installation tools?](http://stackoverflow.com/questions/21374366/what-is-the-difference-usage-of-homebrew-macports-or-other-package-installation) – Dan Dascalescu Apr 12 '15 at 21:39
  • This question is a better fit for AskDifferent now: http://apple.stackexchange.com/questions/32724/what-are-pros-and-cons-for-macports-fink-and-homebrew – Dan Dascalescu Apr 12 '15 at 21:40
  • I'm not a Mac person at all; I came here to get an idea about how Apple users set up their development environments. It sounds like HomeBrew and MacPorts are third-party products, so how do Mac people normally install software? Is there an 'Apple Store' for desktops or something? – Michael Scheper Aug 01 '18 at 16:26

5 Answers5

16

Others have mentioned MacPorts and Homebrew; it might be worth noting the difference between them.

MacPorts works for me, happily enough. But it has the very annoying feature that it wants to install everything. Thus on several occasions, I've had to drag it back from trying to install its own version of Perl, ignoring the system one, or TeX, and even gcc. Now, the reason for this is, I imagine, that if it were to rely on the system versions of these (or any preinstalled one in the case of TeX), there might be some version-skew issue that would cause something to break. And disk space is cheap. That's probably true, sort of, but it still seems a bit obsessive (and I'm not sure I want to use anything that's quite so dependent on specific versions). Sensible or not, it sets my teeth on edge every time it happens.

Homebrew, in contrast, specifically aims not to duplicate tools that are already installed. When MacPorts does its install-the-world thing, I usually end up killing it and installing the package with the mad dependencies by hand, so I've never quite been driven to the point of using Homebrew, but I've been on the point of doing so, ever since I first heard about it.

Norman Gray
  • 11,978
  • 2
  • 33
  • 56
  • 1
    Usually - but yes, not always - one can avoid the MacPorts install-the-world thing by checking the port file (easy to do from the Macports website) for each package to be installed and its recursive dependencies and choosing any appropriate variants; often there are gccxx variants, etc. Granted, still a bit of a PITA but once you know what the variants are, you can usually set them as defaults in `/opt/local/etc/macports/variants.conf` – Ned Deily Aug 25 '10 at 08:00
  • @Ned Deily: That's a useful bit of information -- thanks! I'll be sure to check that next time I have to use MacPorts. – Norman Gray Aug 25 '10 at 13:20
  • I should add, commenting on my own answer, that it's now been a couple of years since I last updated MacPorts; I now use Homebrew exclusively. I still find Homebrew a bit annoying (the `/usr/local` directory is _mine_, dammit, not Homebrew's), but waaaay less so than MacPorts. – Norman Gray Oct 31 '16 at 22:39
5

homebrew http://github.com/mxcl/homebrew

Andrei Serdeliuc ॐ
  • 5,828
  • 5
  • 39
  • 66
5

There isn't an equivalent out of the box.

You may want to take a look at MacPorts:

MacPorts, formerly called DarwinPorts, is a package management system that simplifies the installation of software on the Mac OS X and Darwin operating systems. It is a free/open source software project to simplify installation of other free/open source software. Similar in aim and function to Fink and the BSDs' ports collections, DarwinPorts was started in 2002 as part of the OpenDarwin project, with the involvement of a number of Apple Inc. employees including Landon Fuller, Kevin Van Vechten, and Jordan Hubbard.

http://en.wikipedia.org/wiki/MacPorts

http://www.macports.org/

fletcher
  • 13,380
  • 9
  • 52
  • 69
2

If you really want an apt-based package management, take a look at Fink. It's the "oldest" package manager on Mac OS X and I'm not sure if the packages are properly maintained anymore. But I'm using it successfully under Snow Leopard.

chiborg
  • 26,978
  • 14
  • 97
  • 115
-3
cp -r MyApplication.app /Applications/
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335